From 838e5a07145040ce5250dc28defdb1900f721683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mon?= Date: Sat, 17 Jun 2023 09:52:21 +0100 Subject: [PATCH] Smallfixes (#1280) * FIX: #1246 do not crash on empty params class * FIX: #1279 add supported methods for the web in the readme file --------- Co-authored-by: Remon <> --- README.md | 9 +++++++-- packages/stripe/README.md | 9 +++++++-- .../lib/src/method_channel_stripe.dart | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e5e78974c..b615c318f 100644 --- a/README.md +++ b/README.md @@ -68,10 +68,15 @@ You will also need to update in your Podfile: `platform :ios, '13.0'` - #### Web (Experimental) -Now you can use Stripe with Flutter web! Notice right now it is highly experimental and only a subset of features is implemented. +Now you can use Stripe with Flutter web! Notice right now it is highly experimental and only a subset of features is implemented. Namely: + +- Create paymentmethod +- Confirm payment intent +- Confirm setup intent +- Create token +- Confirm payment element (recommended way of handling payments on web) To use Stripe on web, it is required to add `flutter_stripe_web` in your pubspec file diff --git a/packages/stripe/README.md b/packages/stripe/README.md index e5e78974c..b615c318f 100644 --- a/packages/stripe/README.md +++ b/packages/stripe/README.md @@ -68,10 +68,15 @@ You will also need to update in your Podfile: `platform :ios, '13.0'` - #### Web (Experimental) -Now you can use Stripe with Flutter web! Notice right now it is highly experimental and only a subset of features is implemented. +Now you can use Stripe with Flutter web! Notice right now it is highly experimental and only a subset of features is implemented. Namely: + +- Create paymentmethod +- Confirm payment intent +- Confirm setup intent +- Create token +- Confirm payment element (recommended way of handling payments on web) To use Stripe on web, it is required to add `flutter_stripe_web` in your pubspec file diff --git a/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart b/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart index d8bf47267..1f7cbe023 100644 --- a/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart +++ b/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart @@ -95,7 +95,7 @@ class MethodChannelStripe extends StripePlatform { final result = await _methodChannel .invokeMapMethod('confirmPayment', { 'paymentIntentClientSecret': paymentIntentClientSecret, - 'params': params?.toJson(), + 'params': params?.toJson() ?? {}, 'options': options?.toJson() ?? {}, });