#benstjohn
1 messages · Page 1 of 1 (latest)
hey there, i'll get back to you in a while!
Okay thanks @acoustic roost
I will look at your reply in the morning
so no rush
hello! how are you integrating with the reader? i.e. what SDK are you using - server driven, ios, android, react native?
we are using the iOS sdk for a lot of it, and also using NodeJS hitting the API
using the M2 stripe terminals
based pretty heavily on the example stripe terminal application
i assume for nodejs hitting the API, you're referring to creating the PaymentIntent itself
correct
so the payment intent gets created elsewhere, then the terminal finds the PI and processes it
then it hits the API again to actually capture the PI
so we want a way to clear the PI and clear our the terminal in case of an error/issue with the card
cancelling the PI is fine, but the terminal seems to get stuck in:
It is giving this error: Uncaught StripeInvalidRequestError Error: Reader is not capable of processing this action.
using the "cancel reader action"
while the PI is in the status of 'requires_payment_method'
hmmm, i think this is what you're looking for?
collectPaymentMethod in the iOS SDK is SCPCancelable, so it can be canceled by your code. See here: https://stripe.dev/stripe-terminal-ios/docs/Classes/SCPTerminal.html#/c:objc(cs)SCPTerminal(im)collectPaymentMethod:completion:
And here: https://stripe.dev/stripe-terminal-ios/docs/Classes/SCPCancelable.html#/c:objc(cs)SCPCancelable(im)cancel: