From eb73437f959c14b739f48ab6d0198684b046775b Mon Sep 17 00:00:00 2001 From: hexch Date: Tue, 2 Apr 2024 03:29:09 +0900 Subject: [PATCH] fix: [WEB]Issue of saving/not saving payment information for future. #1673 (#1674) According to the documentation, `setup_future_usage` can be set to `OnSession`, `OffSession`, and `Null`. However, the current code only corresponds to `OnSession` and `OffSession`. --- packages/stripe_web/lib/src/web_stripe.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/stripe_web/lib/src/web_stripe.dart b/packages/stripe_web/lib/src/web_stripe.dart index e412a3b52..39c1e01df 100644 --- a/packages/stripe_web/lib/src/web_stripe.dart +++ b/packages/stripe_web/lib/src/web_stripe.dart @@ -119,9 +119,7 @@ class WebStripe extends StripePlatform { paymentIntentClientSecret, data: stripe_js.ConfirmCardPaymentData( paymentMethod: stripe_js.CardPaymentMethodDetails(card: element!), - setupFutureUsage: (options?.setupFutureUsage ?? - PaymentIntentsFutureUsage.OnSession) - .toJs(), + setupFutureUsage: options?.setupFutureUsage?.toJs(), ), ); },