#Everest-applepay-react
1 messages ยท Page 1 of 1 (latest)
What device are you using?
Do you have any request IDs attached to the flow you're coding through?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I'm using an iPhone XR.
The react native stripe SDK generates any request ID?
It would for certain actions. Let me circle back again here in a couple minutes.
๐ Hopping in - is "Device not supported" the exact error you're getting from our react native sdk? Do you have a real card added to your device?
I'm getting "Apple pay is not supported on this device"
Yes I have a real card added
And you've followed all the steps at https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-apple-pay to enable apple pay?
Yes
In dev mode it works
In the simulator it works
But in the real device i doesnt
What do you mean by "in dev mode"?
In the iphone simulator
gotcha
By using test keys
Can you also share the following:
- the version of our stripe-react-native sdk you're using
- what kind of card brand you have added to your phone
- confirmation that the merchant ID you added in
StripeProvidermatches the one specified in your Xcode apple pay capability
I'm using the version 0.2.3
I have VISA Card on my wallet
The merchant id matches
You've confirmed that Apple Pay works on this device outside of your test app, right?
Yes, but what matters here is whether your device does support apple pay outside of your app - I'm trying to narrow down whether this is an issue with your app, or with your device
If your device is able to use apple pay in other apps, that's a strong indicator that the issue with your app. If your device is not able to use apple pay in other apps, then it's likely something specific to that device
Yes, I already used Apple Pay on others apps
And it works fine
I have a suggestion
Maybe is the Domains?
I don't have configured
Should I?
The domains are only needed if you're trying to integration apple pay for the web - they're not needed for a mobile app
A ok
Can you show me your StripeProvider code and where you initialize the Payment Sheet (making sure to redact your publishable key)
Here is the provider: <StripeProvider publishableKey={Constants.manifest?.extra?.strapiKey} merchantIdentifier={Constants.manifest?.extra?.merchantId}>
Here is the Payment sheet: const { error } = await presentApplePay({
cartItems: [{ label: Constants.manifest?.extra?.appName, amount: getTotalPrice().toString() }],
country: 'ES',
currency: 'EUR'
});
Can you log out Constants.manifest?.extra?.merchantId for me?
Hmm... nothing is sticking out to me as being wrong. I assume you're calling isApplePaySupported before you call presentApplePay and the call to isApplePaySupported is what's failing? In other words when testing on the real device does your code even get to presentApplePay?
isApplePaySupported is only to show the Apple Pay option
When I call presentApplePay is when I get the error
Anyways isApplePaySupported gives false
The problem also is that i cant get much info about the error
If you're only showing the Apple Pay option depending on isApplePaySupported then how are you even calling presentApplePay?
I see - yeah that won't really do much because presentApplePay checks isApplePaySupported before continuing on
I'm running out of possibilities for what it could be - just to be extra sure, can you show me a screenshot of the xcode capability so I can check?
And when you go to https://stripe.com/docs/stripe-js/elements/payment-request-button on your device, can you share a screenshot of what you see?
I'm not using xcode
What do you mean you're not using xcode? How are you adding the capability then (this step from the docs I linked earlier: https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#integrate-with-xcode)
Yup - that context would've been helpful earlier
ah actually nevermind about the entitlements - I see we have things in our sdk that configure those automatically. Do you have this (https://docs.expo.dev/versions/latest/sdk/stripe/#config-plugin-setup-optional) setup?
and asking this question again:
when you go to https://stripe.com/docs/stripe-js/elements/payment-request-button on your device, can you share a screenshot of what you see?
Yes I did. But I'm not sure if I have to rebuild
I'm gonna make a rebuild and then see if it makes any change
I see this
So is that working for you now?
No
When I click on Pay
I get the "Apple pay is not supported on this device" error
Ah, so you still that piece of code that enables the button even if isApplePaySupported: false
Can you answer that question I asked earlier about going to https://stripe.com/docs/stripe-js/elements/payment-request-button
No, forget about isApplePaySupported. I have deleted it just to test the button directly
Yeah at this point I don't know what this could be - the only other thing I'd ask you to try is to run expo config --type introspect to confirm the entitlements look correct
@violet gorge is also going to step in and take a look
๐ give me a few to catch up and I'll respond as soon as I can