Skip to content

Commit

Permalink
[Issues Fix] - #38 Exposed credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Shegun Montcho committed Apr 11, 2024
1 parent ed33d51 commit 2b38403
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.3.0-dev.2

- Remove public_api_key
- Update callback

## 1.3.0-dev.1

- Update sdk loader ui
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import './successScreen.dart';
void main() => runApp(App());
void successCallback(response, context) {
void callback(response, context) {
switch ( response['status'] ) {
case PAYMENT_CANCELLED:
Expand Down Expand Up @@ -102,6 +102,7 @@ void successCallback(response, context) {
break;
default:
debugPrint(UNKNOWN_EVENT);
break;
}
}
Expand All @@ -116,7 +117,7 @@ final kkiapay = KKiaPay(
data: 'Fake data',//
sandbox: true,//
apikey: public_api_key,//
callback: successCallback,//
callback: callback,//
theme: defaultTheme, // Ex : "#222F5A",
partnerId: 'AxXxXXxId',//
paymentMethods: ["momo","card"]//
Expand Down
9 changes: 5 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'success_screen.dart';

void main() => runApp(const App());

void successCallback(response, context) {
void callback(response, context) {
switch (response['status']) {
case PAYMENT_CANCELLED:
debugPrint(PAYMENT_CANCELLED);
Expand Down Expand Up @@ -51,21 +51,22 @@ void successCallback(response, context) {
break;

default:
debugPrint(UNKNOWN_EVENT);
break;
}
}

const kkiapay = KKiaPay(
amount: 1000,
countries: ["BJ","CI"],
countries: ["BJ","CI","SN","TG"],
phone: "22961000000",
name: "John Doe",
email: "[email protected]",
reason: 'transaction reason',
data: 'Fake data',
sandbox: false,
apikey: "LprYUAyMpfAjq4z2yTHPiY0b6XktIQ",
callback: successCallback,
apikey: public_api_key,
callback: callback,
theme: defaultTheme,
partnerId: 'AxXxXXxId',
paymentMethods: ["momo", "card"]);
Expand Down
5 changes: 3 additions & 2 deletions lib/utils/config.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:convert';
import 'dart:ui';

/// developer account api key
const public_api_key = '4afb8d60021211edadbe55ee0346ea8f';
/// developer account public api key
const public_api_key = '###';
/// widget default theme
const defaultTheme = "#4E6BFC";

Expand Down Expand Up @@ -53,6 +53,7 @@ const PAYMENT_SUCCESS = 'PAYMENT_SUCCESS';
const PAYMENT_CANCELLED = 'PAYMENT_CANCELLED';
const PAYMENT_END = 'PAYMENT_END';
const RETRY_PAYMENT = 'RETRY_PAYMENT';
const UNKNOWN_EVENT = 'UNKNOWN_EVENT';

const WAVE_LINK = 'WAVE_LINK';

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: kkiapay_flutter_sdk
description: KKiaPay allows businesses to safely receive payments by mobile money, credit card and bank account.
version: 1.3.0-dev.1
version: 1.3.0-dev.2
homepage: "https://kkiapay.me/"

environment:
Expand Down

0 comments on commit 2b38403

Please sign in to comment.