stripe / stripe-terminal-ios

Stripe Terminal iOS SDK
https://stripe.com/docs/terminal/sdk/ios
Other
100 stars 61 forks source link

`cancelPaymentIntent` hang when card reader active #307

Open toemat opened 3 months ago

toemat commented 3 months ago

Summary

Something that tripped us up for a bit ended up being that calling Terminal.shared.cancelPaymentIntent(_:) never calls back if the card reader is currently listening for a card. The simple solution being to cancel .collectPaymentMethod before, but it took some time to figure that out.

If I may suggest to immediately return an error if cancelPaymentIntent determines it won't be able to complete its task?

(Async version never resolves, and callback version doesn't call back while collectPaymentMethod is running)

SDK version 3.6.0 Reader M2

xiaoshen-stripe commented 1 month ago

Thank you for bringing this to our attention! We are currently discussing this internally to determine the appropriate approach to handle this, will make sure to update here once we align on a solution.

Please do let us know if you notice anything else, we appreciate your feedback