stripe / stripe-terminal-ios

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

An unexpected SDK error occurred during `collectPayment` #323

Closed r2-pro closed 2 months ago

r2-pro commented 2 months ago

Summary

We have users that have issues with collecting payment using card reader. The error from SDK is generic one: Domain: com.stripe-terminal Code: 5000 NSLocalizedDescription: An unexpected SDK error occurred.

Screenshot 2024-08-29 at 09 15 50

Worth to notice, that it happens on beta iOS 18.0.

Code to reproduce

Just call collect payment on the SDK

- (nullable SCPCancelable *)collectPaymentMethod:(SCPPaymentIntent *)paymentIntent
                                      completion:(SCPPaymentIntentCompletionBlock)completion NS_SWIFT_NAME(collectPaymentMethod(_:completion:));

iOS version

iOS 18 iPhone 14 Pro Max

Installation method

Swift Package Manager

SDK version

3.5.0

Other information

We can share some ids for payment intents that we tried to collect payment method for.

Some details of the reader:

<SCPReader: 0x121edc000; deviceSoftwareVersion = 2.01.00.21-SZZZ_Prod_US_v10-481001; deviceType = stripe_m2; label = (null); serialNumber = STRM26146054696; stripeId = tmr_FDs85wmClnuHFU; hardwareInfo = {
bID = CHB316146054696;
batteryLevel = "4.097";
batteryPercentage = 100;
bootloaderVersion = "6.03.03.19";
deviceSettingVersion = "SZZZ_Prod_US_v10";
emvKeyProfileID = 1546;
emvKsn = 3000035233707200002F;
firmwareID = "CHB31.01-21021";
firmwareVersion = "2.01.00.21";
formatID = 60;
hardwareID = "STRM2-01B";
hardwareVersion = "STRM2-01B (0803)";
isCharging = 0;
isSupportedNfc = 1;
isSupportedSoftwarePinPad = 0;
isSupportedTrack1 = 1;
isSupportedTrack2 = 1;
isSupportedTrack3 = 1;
isUsbConnected = 0;
macKeyProfileID = 1546;
macKsn = 4800071340092A60002F;
p2peEnvironment = 1;
p2peReadiness = 1;
pinKeyProfileID = 1546;
pinKsn = 481001134009DEA00001;
productID = 4348423331;
sdkVersion = "3.25.3, 1.6.11";
serialNumber = STRM26146054696;
terminalSettingVersion = "SZZZ_Prod_US_v10";
trackKeyProfileID = 1546;
trackKsn = 3000021340495600002F;
uid = 31393031484D32313032313638333935;
vendorID = 535A5A5A;
};
r2-pro commented 2 months ago

OK. Seems like it might be related to release notes for https://github.com/stripe/stripe-terminal-ios/releases/tag/3.8.0

bric-stripe commented 2 months ago

Seems like it might be related to release notes for https://github.com/stripe/stripe-terminal-ios/releases/tag/3.8.0

@r2-pro that's correct, we fixed this in 3.8+ (and in 2.23.3 for users still on the 2.x line). The problem would occur for PaymentIntent's with an amount >= 100000 in the currencies smallest unit.