diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index a19d30a..a2d1821 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"webview_flutter_wkwebview","path":"/Users/user/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.14.0/","native_build":true,"dependencies":[]}],"android":[{"name":"webview_flutter_android","path":"/Users/user/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.3/","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-09-23 01:23:01.343186","version":"3.21.0-1.0.pre.6"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"webview_flutter_wkwebview","path":"/Users/user/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.14.0/","native_build":true,"dependencies":[]}],"android":[{"name":"webview_flutter_android","path":"/Users/user/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.3/","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-09-23 02:02:03.084629","version":"3.21.0-1.0.pre.6"} \ No newline at end of file diff --git a/example/lib/main.dart b/example/lib/main.dart index e8969d7..820104c 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -42,7 +42,7 @@ class _MyHomePageState extends State { PaystackFlutter().pay( context: context, secretKey: - 'YOUR_PAYSTACK_SECRET_KEY', // Your Paystack secret key. + 'YOUR_PAYSTACK_KEY', // Your Paystack secret key. amount: 60000, // The amount to be charged in the smallest currency unit. If amount is 600, multiply by 100(600*100) email: @@ -50,7 +50,7 @@ class _MyHomePageState extends State { callbackUrl: 'https://callback.com', // The URL to which Paystack will redirect the user after the transaction. showProgressBar: - true, // If true, it shows progress bar to inform user an action is in progress when getting checkout link from Paystack. + false, // If true, it shows progress bar to inform user an action is in progress when getting checkout link from Paystack. paymentOptions: [ PaymentOption.card, PaymentOption.bankTransfer, diff --git a/example/pubspec.lock b/example/pubspec.lock index a43e6d5..e9064e1 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -169,7 +169,7 @@ packages: path: ".." relative: true source: path - version: "1.0.1" + version: "1.0.2" plugin_platform_interface: dependency: transitive description: diff --git a/lib/src/models/paystack_request.dart b/lib/src/models/paystack_request.dart index c982b75..1f6d63d 100644 --- a/lib/src/models/paystack_request.dart +++ b/lib/src/models/paystack_request.dart @@ -101,7 +101,8 @@ class PaystackRequest { /// Converts the PaystackRequest object to a JSON map suitable for sending to the Paystack API. Map toJson() { // Call updateMetadata to ensure the "cancel_action" key-value pair is added - updateMetadata("cancel_action", "https://github.com/VhiktorBrown/paystack_flutter"); + updateMetadata( + "cancel_action", "https://github.com/VhiktorBrown/paystack_flutter"); final Map baseJson = { "amount": amount, diff --git a/lib/src/paystack_webview.dart b/lib/src/paystack_webview.dart index 234ffd2..a4a4b8f 100644 --- a/lib/src/paystack_webview.dart +++ b/lib/src/paystack_webview.dart @@ -192,7 +192,8 @@ class _PaystackWebviewState extends State { } //check if Paystack redirects to cancel_url - if(uri.toString() == "https://github.com/VhiktorBrown/paystack_flutter"){ + if (uri.toString() == + "https://github.com/VhiktorBrown/paystack_flutter") { Navigator.pop(context); //this means the user cancelled payment. widget.onCancelled(callback);