Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB]Issue of saving/not saving payment information for future. #1673

Closed
hexch opened this issue Mar 6, 2024 · 1 comment
Closed

[WEB]Issue of saving/not saving payment information for future. #1673

hexch opened this issue Mar 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hexch
Copy link
Contributor

hexch commented Mar 6, 2024

Describe the bug

I'm using the stripe_web package.
It seems unable to opt-out of saving payment information during confirmPayment.
Here is my code:

await WebStripe.instance.confirmPayment(
  model.stripeSecret,
  const PaymentMethodParams.card(
    paymentMethodData: PaymentMethodData(),
  ),
  PaymentMethodOptions(
    setupFutureUsage: saveCardInfo
        ? PaymentIntentsFutureUsage.OffSession
        : null,
  ),
);

I have noticed that the code in stripe_web does not align with the documentation provided by Stripe. I will submit a pull request shortly for your review. Please help confirm.

To Reproduce
Steps to reproduce the behavior:

  1. set saveCardInfo to false
  2. do confirmPayment
  3. check the Payment Information of the Customer in Stripe Dashboard

Expected behavior
If saveCardInfo is set to false, Stripe should not store the user-inputted payment information.

Smartphone / tablet

  • Device: Mac
  • Package version:flutter_stripe_web 4.4.0

Additional context
none

@hexch hexch added the needs triage Needs triage label Mar 6, 2024
hexch added a commit to hexch/flutter_stripe that referenced this issue Mar 6, 2024
…lutter-stripe#1673

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`.
@remonh87 remonh87 added bug Something isn't working and removed needs triage Needs triage labels Mar 16, 2024
remonh87 pushed a commit that referenced this issue Apr 1, 2024
…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`.
@hexch
Copy link
Contributor Author

hexch commented Apr 3, 2024

Thanks for reviewing.

@hexch hexch closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants