Skip to content

Commit

Permalink
fix: [WEB]Issue of saving/not saving payment information for future. #…
Browse files Browse the repository at this point in the history
…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`.
  • Loading branch information
hexch committed Apr 1, 2024
1 parent 8f51e14 commit eb73437
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/stripe_web/lib/src/web_stripe.dart
Expand Up @@ -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(),
),
);
},
Expand Down

0 comments on commit eb73437

Please sign in to comment.