From 064aacee628a955310f8b91e27fdc38caaae40ae Mon Sep 17 00:00:00 2001 From: Shegun MONTCHO Date: Mon, 2 Sep 2024 09:02:09 +0100 Subject: [PATCH] update payment objet requirement --- .flutter-plugins-dependencies | 1 - example/.flutter-plugins-dependencies | 2 +- .../ios/Flutter/flutter_export_environment.sh | 4 +-- example/lib/main.dart | 19 +++++++------ example/pubspec.lock | 28 +++++++++---------- lib/src/features/mobile/kkiapay.dart | 22 +++++++-------- pubspec.lock | 26 ++++++++--------- 7 files changed, 51 insertions(+), 51 deletions(-) delete mode 100644 .flutter-plugins-dependencies diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies deleted file mode 100644 index 36e40ee..0000000 --- a/.flutter-plugins-dependencies +++ /dev/null @@ -1 +0,0 @@ -{"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-05-22 12:21:39.382829","version":"3.19.5"} \ No newline at end of file diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 2350266..13ead22 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"/opt/homebrew/Caskroom/flutter/3.22.2/flutter/packages/integration_test/","native_build":true,"dependencies":[]},{"name":"kkiapay_flutter_sdk","path":"/Users/shegunmontcho/StudioProjects/opensi/kkiapay-flutter-sdk/","native_build":true,"dependencies":["webview_flutter_wkwebview"]},{"name":"url_launcher_ios","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.0/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.13.1/","native_build":true,"dependencies":[]}],"android":[{"name":"integration_test","path":"/opt/homebrew/Caskroom/flutter/3.22.2/flutter/packages/integration_test/","native_build":true,"dependencies":[]},{"name":"kkiapay_flutter_sdk","path":"/Users/shegunmontcho/StudioProjects/opensi/kkiapay-flutter-sdk/","native_build":true,"dependencies":["webview_flutter_android"]},{"name":"url_launcher_android","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.2/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[]}],"web":[{"name":"kkiapay_flutter_sdk","path":"/Users/shegunmontcho/StudioProjects/opensi/kkiapay-flutter-sdk/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/","dependencies":[]}]},"dependencyGraph":[{"name":"integration_test","dependencies":[]},{"name":"kkiapay_flutter_sdk","dependencies":["url_launcher","webview_flutter","webview_flutter_android","webview_flutter_wkwebview"]},{"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-07-15 15:36:36.246765","version":"3.22.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"/opt/homebrew/Caskroom/flutter/3.22.2/flutter/packages/integration_test/","native_build":true,"dependencies":[]},{"name":"kkiapay_flutter_sdk","path":"/Users/shegunmontcho/StudioProjects/opensi/kkiapay-flutter-sdk/","native_build":true,"dependencies":["webview_flutter_wkwebview"]},{"name":"url_launcher_ios","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.0/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.13.1/","native_build":true,"dependencies":[]}],"android":[{"name":"integration_test","path":"/opt/homebrew/Caskroom/flutter/3.22.2/flutter/packages/integration_test/","native_build":true,"dependencies":[]},{"name":"kkiapay_flutter_sdk","path":"/Users/shegunmontcho/StudioProjects/opensi/kkiapay-flutter-sdk/","native_build":true,"dependencies":["webview_flutter_android"]},{"name":"url_launcher_android","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.2/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.0/","native_build":true,"dependencies":[]}],"linux":[{"name":"url_launcher_linux","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[]}],"windows":[{"name":"url_launcher_windows","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[]}],"web":[{"name":"kkiapay_flutter_sdk","path":"/Users/shegunmontcho/StudioProjects/opensi/kkiapay-flutter-sdk/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/shegunmontcho/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/","dependencies":[]}]},"dependencyGraph":[{"name":"integration_test","dependencies":[]},{"name":"kkiapay_flutter_sdk","dependencies":["url_launcher","webview_flutter","webview_flutter_android","webview_flutter_wkwebview"]},{"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-09-02 08:52:55.186397","version":"3.24.0","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index 251742f..4f5b6bd 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -1,7 +1,7 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/opt/homebrew/Caskroom/flutter/3.16.9/flutter" -export "FLUTTER_APPLICATION_PATH=/Users/segun/StudioProjects/opensi/kkiapay-flutter-sdk/example" +export "FLUTTER_ROOT=/opt/homebrew/Caskroom/flutter/3.22.2/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/shegunmontcho/StudioProjects/opensi/kkiapay-flutter-sdk/example" export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_BUILD_DIR=build" diff --git a/example/lib/main.dart b/example/lib/main.dart index 309eb31..99155bd 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -53,18 +53,19 @@ void callback(response, context) { const kkiapay = KKiaPay( amount: 1, - countries: ["BJ","CI","SN","TG"], - phone: "22961000000", - name: "John Doe", - email: "email@mail.com", - reason: 'transaction reason', - data: 'Fake data', sandbox: false, apikey: public_api_key, callback: callback, - theme: defaultTheme, - partnerId: 'AxXxXXxId', - paymentMethods: ["momo", "card"]); + //countries: ["BJ","CI","SN","TG"], + //phone: "22961000000", + //name: "John Doe", + //email: "email@mail.com", + //reason: 'transaction reason', + //data: 'Fake data', + //theme: defaultTheme, + //partnerId: 'AxXxXXxId', + //paymentMethods: ["momo", "card"] +); class App extends StatelessWidget { const App({super.key}); diff --git a/example/pubspec.lock b/example/pubspec.lock index f1283f4..bcf5e84 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -154,18 +154,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -194,18 +194,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" nested: dependency: transitive description: @@ -226,10 +226,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -335,10 +335,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" typed_data: dependency: transitive description: @@ -431,10 +431,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" web: dependency: transitive description: diff --git a/lib/src/features/mobile/kkiapay.dart b/lib/src/features/mobile/kkiapay.dart index 2cc5426..4dcfd09 100644 --- a/lib/src/features/mobile/kkiapay.dart +++ b/lib/src/features/mobile/kkiapay.dart @@ -21,7 +21,7 @@ class KKiaPay extends StatefulWidget { /// @Params : Payment reason /// Ex : "transaction reason" - final String reason; + final String? reason; /// @Params : Payment phoneNumber /// Ex : "22961000000" @@ -75,20 +75,20 @@ class KKiaPay extends StatefulWidget { super.key, /* Payment info */ required this.amount, - required this.reason, - this.phone, - this.name, - this.email, - this.data, - this.partnerId, required this.callback, - this.callbackUrl, + this.reason = "", + this.phone = "", + this.name = "", + this.email = "", + this.data = "", + this.partnerId = "", + this.callbackUrl = "", /* Widget ui config */ required this.apikey, required this.sandbox, - this.theme, - this.countries, - this.paymentMethods, + this.theme = defaultTheme, + this.countries = const ["BJ","CI","SN","TG"], + this.paymentMethods = const ["momo", "card"] }); @override diff --git a/pubspec.lock b/pubspec.lock index 5cb8cd4..8246310 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -324,18 +324,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -380,18 +380,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mime: dependency: transitive description: @@ -585,10 +585,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" timing: dependency: transitive description: @@ -689,10 +689,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" watcher: dependency: transitive description: @@ -702,7 +702,7 @@ packages: source: hosted version: "1.1.0" web: - dependency: transitive + dependency: "direct main" description: name: web sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"