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, }, }; }