question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Payment flow never cancel

See original GitHub issue

Platform

  • Web
  • iOS
  • Android

Describe the bug When you call Stripe.presentPaymentFlow() it opens a closable modal sheet. Unfortunately, the return of this function is inconsistent as it’s not able to distinguish between the modal sheet being closed or a credit card being selected. Actually if you close it with the cross, you get the cardNumber of the default selected credit card and the PaymentFlowEventsEnum.Completed event is triggered instead of PaymentFlowEventsEnum.Canceled. This is not what’s expected.

To Reproduce Steps to reproduce the behavior:

  1. Call Stripe.presentPaymentFlow()
  2. Press the cross to close the modal
  3. See the PaymentFlowEventsEnum.Completed being triggered and the function return the default selected card.

Expected behavior The PaymentFlowEventsEnum.Canceled being triggered on cancel.

Edit I tested with the iOS Simulator and that doesn’t work either. The default selected payment method is returned.

Here is a screenshot taken right after presentPaymentFlow(). Pressing the cross is equivalent to pressing on Google Pay or on the credit card already registered, depending on the default selected payment method. Screenshot_2022-07-06-08-19-26-14_cd9790fdd8d7837e7a7940c8e2b868ec

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:22 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
cyrilfrcommented, Jul 25, 2022

countryCode is only use on Google Pay method. So if google pay is disabled, countryCode don’t set in plugin: https://github.com/capacitor-community/stripe/blob/master/android/src/main/java/com/getcapacitor/community/stripe/paymentsheet/PaymentSheetExecutor.java#L85

OK I though it was used to preset the country when entering credit card detail. My bad.

Thanks.

1reaction
rdlabocommented, Jul 20, 2022

I released v3.9.1-0. Please try in PaymentSheet method. Thanks.

@cyrilfr

Read more comments on GitHub >

github_iconTop Results From Across the Web

How intents work | Stripe Documentation
Canceling it invalidates the PaymentIntent for future payment attempts, and can't be undone. If any funds have been held, cancellation returns them.
Read more >
What is a Stop Payment?: How They Work and What it Costs
Stop payment orders allow you to request a hold on personal checks or automatic debits that haven't been processed yet.
Read more >
How To Cancel a Pending Transaction - The Balance
Pending transactions can eat up your available credit or bank account balance, but canceling them isn't always easy. Learn what they are and ......
Read more >
How Do I Cancel a Credit Card Transaction? - WalletHub
If you want to cancel a credit card transaction because you think it is fraudulent, the first thing you should do is search...
Read more >
Canceling Pending Transaction: A Step-by-Step Guide
And if you've ever tried to cancel a pending transaction, ... for as long as it takes the transaction to process — which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found