Open lukesalter opened 6 months ago
I am also facing the same issue
@lukesalter @agarwalrohit2503 i faced this issue a few weeks back. This is the solution:
https://github.com/BreX900/mek-packages/issues/56#issuecomment-1998654738
I am going to create a PR to address this.
@StephanWalters yes please - that would be amazing. Thanks for finding this and digging it out. We've got a contactless app ready to go in to the app store and this is one of the missing pieces.
Am I doing something wrong or is the package not handling simulated declines properly on iOS.
I'm getting the same results using Tap to Pay for all of the following on iOS:
I've been using the test card amounts listed here to simulate the failures: https://docs.stripe.com/terminal/references/testing#physical-test-cards for the following amounts I'm just seeing a generic failure when calling
confirmPaymentIntent()
:All of these amounts give the error above:
However the following scenario amount is working as expecting (showing the PIN UI and then succeeding)
When I catch and swallow the PlatformException I can use the terminal to retrieve the the paymentIntent and successfully see that there is a failed charges on there in the charges list but this isn't ideal and doesn't behave like Android does. Android returns a proper TerminalExceptionCode.stripeApiError with a lovely apiError I can parse for a decline message to inform the user.
Essentially it looks like iOS isn't handling simulated scenarios properly with test values (either when simulated or using a physical test card). Is this something other people are finding? Can this be fixed in the package?
Hopefully the stack trace above will help you find the issue but if you need any more information let me know.