-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add confirmPaymentIntent to process payments via StripeTerminal #342
Add confirmPaymentIntent to process payments via StripeTerminal #342
Conversation
…t (replace Completed event); update plugin listeners
@rdlabo Should I add the I think |
thanks for the great work.
It should be necessary, but this time I will remove Completed to clearly communicate that the process itself has changed. So it is fine as it is! |
Looks good and will be merged. |
released @capacitor-community/stripe-terminal@5.5.0-beta.0 I will be testing on the device by the end of this week and will officially release it. |
After some research I found that Tap to Pay on Android does not work on Android 14 devices. The Stripe Terminal SDK in the android build.gradle needs to be updated to at least 3.2.1 On my end I updated the Stripe Terminal SDK (core & local-mobile modules) to 3.4. I have tested this on my end on a physical device and was able to use Tap to Pay on Android (without having to simulate the reader connection) However when running
Could this be because of Android API 34 support? |
@yllaw The plugin specifies the Terminal SDK as '3.3.+'. https://github.com/capacitor-community/stripe/blob/main/packages/terminal/android/build.gradle#L10C1-L10C135 The next update will update it to '3.4.+', so this does not seem to be a problem. There was a breaking change in 3.4.0, which may be the reason for such an error. This will be addressed in the plugin itself. |
A version with the method |
In reference to #341 the confirmPaymentIntent is missing from the terminal payment flow. This step is needed to process payment and change the state of the PaymentIntent to
succeeded
orrequires_capture
per the Stripe documentationI have also replaced TerminalEvents.Completed in favor of TerminalEvents.CollectedPaymentIntent & TerminalEvents.ConfirmedPaymentIntent
Please code review and test.
I have tested this on iOS (Tap to Pay on iPhone) and can confirm it works - the payment intent status changes to succeeded state
EDIT: I have also tested this on a physical Android Device (Simulated Reader since Tap to Pay is not allowed on debuggable android applications)