From c4c3e499b5b0dbf99521d854968a380fcad62bf5 Mon Sep 17 00:00:00 2001 From: Remon <> Date: Tue, 12 Sep 2023 20:35:41 +0100 Subject: [PATCH] fix: #1409 send usesDeprecatedTokenFlow to stripe platform --- packages/stripe/lib/src/stripe.dart | 5 ++++- .../lib/src/method_channel_stripe.dart | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/stripe/lib/src/stripe.dart b/packages/stripe/lib/src/stripe.dart index dd1c9314e..dea363011 100644 --- a/packages/stripe/lib/src/stripe.dart +++ b/packages/stripe/lib/src/stripe.dart @@ -150,7 +150,10 @@ class Stripe { }) async { try { await _awaitForSettings(); - return await _platform.platformPayCreatePaymentMethod(params: params); + return await _platform.platformPayCreatePaymentMethod( + params: params, + usesDeprecatedTokenFlow: usesDeprecatedTokenFlow, + ); } on StripeError { rethrow; } 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 fe9273dc5..d97e0b3be 100644 --- a/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart +++ b/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart @@ -507,6 +507,7 @@ class MethodChannelStripe extends StripePlatform { data = { 'applePay': { ...params.applePayParams.toJson(), + 'usesDeprecatedTokenFlow': usesDeprecatedTokenFlow, }, }; } else if (params is PlatformPayPaymentMethodParamsGooglePay) { @@ -514,6 +515,7 @@ class MethodChannelStripe extends StripePlatform { 'googlePay': { ...params.googlePayParams.toJson(), ...params.googlePayPaymentMethodParams.toJson(), + 'usesDeprecatedTokenFlow': usesDeprecatedTokenFlow, }, }; }