Skip to content

Commit

Permalink
Remove payment_failed event
Browse files Browse the repository at this point in the history
  • Loading branch information
Shegun Montcho committed Apr 15, 2024
1 parent 086c84e commit 100d689
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"url_launcher_ios","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.13.0/","native_build":true,"dependencies":[]}],"android":[{"name":"url_launcher_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.0/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-04-11 14:31:56.950470","version":"3.19.5"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"url_launcher_ios","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.13.0/","native_build":true,"dependencies":[]}],"android":[{"name":"url_launcher_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.0/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-04-15 14:43:39.624283","version":"3.19.5"}
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.4

- Remove payment_failed event
- update readme.md

## 1.3.0-dev.3

- Reopening wave payment
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ void callback(response, context) {
);
break;
case PAYMENT_FAILED:
Navigator.pop(context);
print(PAYMENT_FAILED);
break;
default:
debugPrint(UNKNOWN_EVENT);
break;
Expand All @@ -109,11 +104,11 @@ void callback(response, context) {
final kkiapay = KKiaPay(
amount: 1000,//
countries: ["BJ"],//
countries: ["BJ","CI","SN","TG"],//
phone: "22961000000",//
name: "John Doe",//
email: "[email protected]",//
reason: 'transaction reason',//
reason: 'Transaction reason',//
data: 'Fake data',//
sandbox: true,//
apikey: public_api_key,//
Expand Down
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"url_launcher_ios","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.13.0/","native_build":true,"dependencies":[]}],"android":[{"name":"url_launcher_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.0/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-04-11 14:31:57.005638","version":"3.19.5"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"url_launcher_ios","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.13.0/","native_build":true,"dependencies":[]}],"android":[{"name":"url_launcher_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.0/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/segun/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[]}],"web":[{"name":"url_launcher_web","path":"/Users/segun/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-04-15 14:43:39.724002","version":"3.19.5"}
15 changes: 5 additions & 10 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ void callback(response, context) {

case PAYMENT_INIT:
debugPrint(PAYMENT_INIT);
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text(PAYMENT_INIT),
));
//ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
//content: Text(PAYMENT_INIT),
//));
break;

case PAYMENT_SUCCESS:
Expand All @@ -45,21 +45,16 @@ void callback(response, context) {
);
break;

case PAYMENT_FAILED:
debugPrint(PAYMENT_FAILED);
Navigator.pop(context);
break;

default:
debugPrint(UNKNOWN_EVENT);
break;
}
}

const kkiapay = KKiaPay(
amount: 1000,
amount: 1,
countries: ["BJ","CI","SN","TG"],
phone: "22961000000",
phone: "22961877882",
name: "John Doe",
email: "[email protected]",
reason: 'transaction reason',
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.3.0-dev.3"
version: "1.3.0-dev.4"
leak_tracker:
dependency: transitive
description:
Expand Down
67 changes: 1 addition & 66 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,16 @@
name: example
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: 'none'

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1

environment:
sdk: '>=3.1.0 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter


# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
kkiapay_flutter_sdk: #^1.2.12
path: ../
Expand All @@ -42,51 +19,9 @@ dev_dependencies:
flutter_test:
sdk: flutter

# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware

# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
7 changes: 0 additions & 7 deletions lib/src/widget_builder_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,6 @@ class _KKiaPayState extends State<KKiaPay> {
}, context);
break;

case PAYMENT_FAILED: widget.callback( {
'requestData': null,
'transactionId': JsonDecoder().convert(message.message)["data"]["transactionId"],
'status': CallbackStatus.PAYMENT_FAILED.name
}, context);
break;

case WAVE_LINK:
Utils.launchWave(
JsonDecoder().convert(message.message)["data"],);
Expand Down
3 changes: 2 additions & 1 deletion lib/utils/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:convert';
import 'dart:ui';

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

Expand Down Expand Up @@ -48,6 +48,7 @@ const PAYMENT_INIT = 'PAYMENT_INIT';
const PAYMENT_ABORTED = 'PAYMENT_ABORTED';
const PENDING_PAYMENT = 'PENDING_PAYMENT';
const ON_USER_FEEDBACK = 'ON_USER_FEEDBACK';
@Deprecated('We no longer send this event: in case of failure the client can either try again or cancel')
const PAYMENT_FAILED = 'PAYMENT_FAILED';
const PAYMENT_SUCCESS = 'PAYMENT_SUCCESS';
const PAYMENT_CANCELLED = 'PAYMENT_CANCELLED';
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.3
version: 1.3.0-dev.4
homepage: "https://kkiapay.me/"

environment:
Expand Down

0 comments on commit 100d689

Please sign in to comment.