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

confirmPayment can't be false #79

Closed
LastxTemplar opened this issue May 26, 2021 · 1 comment
Closed

confirmPayment can't be false #79

LastxTemplar opened this issue May 26, 2021 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@LastxTemplar
Copy link

Describe the bug
setting the confirmPayment parameter to false results in the Payment Sheet not appearing on the screen and no errors appearing in the console.

await Stripe.instance.presentPaymentSheet(
    parameters: PresentPaymentSheetParameters(
        clientSecret: _paymentSheetData['paymentIntentClientSecret'],
        confirmPayment: false,
    )
);

To Reproduce
Use the Payment Sheet method in the example app provided by the package and change the confirmPayment parameter to false

Expected behavior
The payment sheet should appear as usual in order to input the card details

Smartphone / tablet

  • Device: Pixel 4 XL
  • OS: Android 11
  • Package version: flutter_stripe: ^1.0.1+2
  • Flutter version: Flutter 2.0.6 • channel stable
@remonh87 remonh87 self-assigned this May 27, 2021
@remonh87
Copy link
Member

Good catch we found out that the parameters:
confirmPayment on present paymentsheet and customFlow on initPaymentSheet need to be in sync.

So you need to make sure of the following:
if customFlow = true then confirmPayment = false
if customFlow = false then confirmPayment = true

We will update the docs and add an assert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants