stripe / stripe-terminal-ios

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

CollectPaymentMethod returns cancel error, and payment intent got canceled #278

Closed jonhcbs closed 5 months ago

jonhcbs commented 11 months ago

Summary

we are using a testing card, and found a wired issue that collectPaymentMethod always returns cancel error, and only need to restart app the reader can work again.

But we can not reproduced it, and don't know exact steps. this issue happened 2-3 times since we upgraded sdk to 3.2.0, not sure if it is related to sdk version.

we tried 6 time to swipe/insert the card on reader to pay, and all failed. But after restart app, it works, can pay success. below is the payment intents we tried. all were created, then got canceled automatically.

pi_3OPbx9APQoqa93xj2fndgGj0
pi_3OPbtwAPQoqa93xj2SdsGPEI
pi_3OPbtaAPQoqa93xj14whl3D2
pi_3OPbtEAPQoqa93xj1Armux4v
pi_3OPbt2APQoqa93xj35b00rQ8
pi_3OPbskAPQoqa93xj13Km9CsN

Code to reproduce

Terminal.shared.collectPaymentMethod(intent) { (intentWithPaymentMethod, attachError) in
if let error = attachError {
                if (error as NSError).code == ErrorCode.canceled.rawValue {
                    self.cancelPaymentIntent(intent: intent)   // the payment intent got canceled here
                } else {
                    ///
                }
          }
 }

iOS version

16.3

Installation method

cocoapods

SDK version

3.2.0

Other information

firmwareVersion: 2.01.00.20-SZZZ_Prod_US_v5-480001 readerSN: STRM26146012871

bric-stripe commented 11 months ago

Thanks for the report detailing serial numbers and PIs and all 🙏 I took a quick look through some logs and can see the cancel happening as soon as the collect starts but I don't yet understand what's causing it, but wanted to acknowledge that we're looking in to it.

we are using a testing card

were you using a stripe test card or another test card? No card should cause it to behave this way, just want to know to make sure we're attempting to reproduce with the same card.

jonhcbs commented 11 months ago

yes we are using stripe test card. can check this video https://www.youtube.com/shorts/KfxG7vAWaqM

jonhcbs commented 10 months ago

hello, is there any finding of this? it happened again, not sure reader issue or sdk issue, still got canceled when pay, after restart the app after it works again updated video: https://www.youtube.com/shorts/hj8BlPgNdCg

related pi:

pi_3OWFaiAPQoqa93xj2BsnlSNd
pi_3OWFb2APQoqa93xj2MzYVCfZ
pi_3OWFbFAPQoqa93xj2J3xLu9N
pi_3OWFeNAPQoqa93xj3MAbMzvN
jonhcbs commented 10 months ago

@bric-stripe

bric-stripe commented 10 months ago

thanks for the additional PI samples. Still unclear what's going on here but I've sent the reader team more logs showing what looks like the reader canceling the collection right away and will report back when we know more.

Let us know if you find any way to consistently reproduce this as that will be extremely helpful in debugging. We haven't been able to repro so far so are just working off what observability we have.

jonhcbs commented 10 months ago

@bric-stripe Are you able to reproduce this?can you confrim is this a sdk or reader issue?

bric-stripe commented 10 months ago

no, we haven't been able to repro yet and so are unable to confidently identify it as an SDK or reader issue.

Roniy08 commented 6 months ago

thanks for the additional PI samples. Still unclear what's going on here but I've sent the reader team more logs showing what looks like the reader canceling the collection right away and will report back when we know more.

Let us know if you find any way to consistently reproduce this as that will be extremely helpful in debugging. We haven't been able to repro so far so are just working off what observability we have.

is any solution are present because I am also facing same issue.

jonhcbs commented 5 months ago

close due to not reproduced