stripe / stripe-terminal-ios

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

`enableCustomerCancellation = true` prevents `collectPaymentMethod` on simulator / iOS Tap to Pay #301

Open chrisbianca opened 2 months ago

chrisbianca commented 2 months ago

Summary

Setting enableCustomerCancellation to TRUE when using the iOS simulator or the Tap to Pay reader, results in collectPaymentMethod giving the following error: This feature is currently not available for the selected reader. This works fine with a physical reader (WisePOS E).

This means that different code paths have to be used dependent on the type of reader being used.

Setting the same flag to TRUE when calling collectSetupIntent does not exhibit the same behaviour.

Code to reproduce

--

iOS version

17.4.0

Installation method

Cocoapods (as part of the Terminal React Native SDK)

SDK version

3.4.0 (via React Native SDK version 0.0.1-beta.17)

Other information

I opted to log the issue here rather than in the Stripe React Native Terminal SDK repository as it appears to be an error in the underlying iOS SDK rather than in the React Native wrapper.

mshafrir-stripe commented 1 month ago

@chrisbianca thanks for filing this issue. I agree that it adds some burden and friction to the user's integration.

For Tap to Pay transactions, because the Tap to Pay UI always shows a cancellation button, we can relax the restrictions to allow enableCustomerCancellation set to TRUE for Tap to Pay transactions. I'll need to investigate whether we can apply the same logic to simulator transactions.

mshafrir-stripe commented 1 month ago

When you mention "iOS simulator", can you clarify if you're using an sPOS simulator or something else?