question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

presentApplePay: Error code of "Apple pay is not supported on this device" is "Canceled" but isApplePaySupported returns true

See original GitHub issue

Device:

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:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10

github_iconTop GitHub Comments

5reactions
juancsaenzcommented, May 30, 2022

@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.

2reactions
mircovippinncommented, May 16, 2022

@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,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apple pay is not working in real device
I implemented the apple pay with a stripe. When I tap the apple pay button it doesn't show any payment sheet and it...
Read more >
Apple Pay | Stripe Documentation
Allow customers to securely make payments using Apple Pay on their iPhone, iPad, and Apple Watch.
Read more >
@stripe/stripe-react-native
A boolean indicating whether or not the sheet was successfully closed. Will return false if the Apple Pay sheet was not open.
Read more >
Stripe React Native Migration Function by Function - Tipsi ...
Setting params are not available in stripe-react-native but we believe that ... to true in order to have a full card number returned...
Read more >
Working With Apple Pay - Ali Akhtar
Apple pay is available on all devices that has a secure element chip. ... As shown in Figure 5 in my real device...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found