presentApplePay: Error code of "Apple pay is not supported on this device" is "Canceled" but isApplePaySupported returns true
See original GitHub issueDevice:
Iphone 12 Pro - iOS 15
Stripe version:
0.2.3
Describe the bug:
I am testing my app without apple id in order to simulate apple pay not being supported.
Not sure why but isApplePaySupported
is returning true. It shouldn’t since I don’t have an apple id -> this means i don’t have any credit card assigned on device settings.
But anyway, let’s assume i am doing something wrong.
After calling presentApplePay
it throws:
{"code": "Canceled", "declineCode": undefined, "localizedMessage": undefined, "message": "Apple pay is not supported on this device", "stripeErrorCode": undefined, "type": undefined}
Expected behavior:
The error code must be different than "Canceled"
.
When the user close the apple pay modal, presentApplePay resolves with an error like this one:
{
"code": "Canceled",
"message": "The payment has been canceled",
...
}
Is the same error code as the normal cancel flow so there is no way to differentiate both of them.
Sorry for lack of information, but I think this should be more than enough to check it out and see if it can be changed.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:10
@mircovippinn This is not the problem, I have multiple cards configured on my real device and it only works on XCode simulators, “Apple pay is not supported on this device” on real devices. I think that this issue must be reopened @charliecruzan-stripe
@stripe/stripe-react-native: 0.11.0
UPDATE
Solved. For anyone that comes here for this problem -> In our case the problem was that we doesn’t add the Merchant ID provided by stripe on Xcode>Project Name>Target>Signing & Capabilities, click on “+” and select Apple Pay and add the merchant Id provided by Stripe.
@charliecruzan-stripe I’ve the same issue. “Apple pay is not supported on this device” (my device is a iPhone 8 Plus iOS 15.3.1). I’ve Apple ID, and I’m logged on iCloud, but isApplePaySupported return false and not show the Apple Pay button,