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 d678b1972..42141813d 100644 --- a/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart +++ b/packages/stripe_platform_interface/lib/src/method_channel_stripe.dart @@ -508,6 +508,7 @@ class MethodChannelStripe extends StripePlatform { data = { 'applePay': { ...params.applePayParams.toJson(), + 'usesDeprecatedTokenFlow': usesDeprecatedTokenFlow, }, }; } else if (params is PlatformPayPaymentMethodParamsGooglePay) { @@ -515,6 +516,7 @@ class MethodChannelStripe extends StripePlatform { 'googlePay': { ...params.googlePayParams.toJson(), ...params.googlePayPaymentMethodParams.toJson(), + 'usesDeprecatedTokenFlow': usesDeprecatedTokenFlow, }, }; }