#Everest-applepay-react

1 messages ยท Page 1 of 1 (latest)

smoky kelp
#

What device are you using?

summer kayak
#

The react native stripe SDK generates any request ID?

smoky kelp
#

It would for certain actions. Let me circle back again here in a couple minutes.

summer kayak
#

Ok

#

Thanks in advance

nocturne quest
#

๐Ÿ‘‹ 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?

summer kayak
#

I'm getting "Apple pay is not supported on this device"

#

Yes I have a real card added

nocturne quest
summer kayak
#

Yes

#

In dev mode it works

#

In the simulator it works

#

But in the real device i doesnt

nocturne quest
#

What do you mean by "in dev mode"?

summer kayak
#

In the iphone simulator

nocturne quest
#

gotcha

summer kayak
#

By using test keys

nocturne quest
#

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 StripeProvider matches the one specified in your Xcode apple pay capability
summer kayak
#

I'm using the version 0.2.3

#

I have VISA Card on my wallet

#

The merchant id matches

nocturne quest
#

You've confirmed that Apple Pay works on this device outside of your test app, right?

summer kayak
#

Mmmmm

#

It works on the simulator with test data

#

But in the real device it doesnt

nocturne quest
#

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

summer kayak
#

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?

nocturne quest
#

The domains are only needed if you're trying to integration apple pay for the web - they're not needed for a mobile app

summer kayak
#

A ok

nocturne quest
#

Can you show me your StripeProvider code and where you initialize the Payment Sheet (making sure to redact your publishable key)

summer kayak
#

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'
});

nocturne quest
#

Can you log out Constants.manifest?.extra?.merchantId for me?

summer kayak
#

Sure

#

I get merchant.com.fravak

nocturne quest
#

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?

summer kayak
#

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

nocturne quest
#

If you're only showing the Apple Pay option depending on isApplePaySupported then how are you even calling presentApplePay?

summer kayak
#

I disable it to call presentApplePay

#

Just to test

nocturne quest
#

I see - yeah that won't really do much because presentApplePay checks isApplePaySupported before continuing on

summer kayak
#

Yes

#

The error is related

nocturne quest
#

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?

summer kayak
#

I'm not using xcode

nocturne quest
summer kayak
#

I'm using Expo

#

Do you know what it is?

nocturne quest
#

Yup - that context would've been helpful earlier

summer kayak
#

Sorry ๐Ÿ˜ฃ

#

I didn't it was related

nocturne quest
#

okay so what do you entitlements look like?

#

and you're not using expo go, right?

summer kayak
#

Well I'm using expo eas build

#

What do you mean by entitlements?

nocturne quest
summer kayak
#

I'm gonna make a rebuild and then see if it makes any change

#

I see this

nocturne quest
#

So is that working for you now?

summer kayak
#

No

#

When I click on Pay

#

I get the "Apple pay is not supported on this device" error

nocturne quest
#

Ah, so you still that piece of code that enables the button even if isApplePaySupported: false

summer kayak
summer kayak
nocturne quest
#

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

violet gorge
#

๐Ÿ‘‹ give me a few to catch up and I'll respond as soon as I can

summer kayak
#

I got that

#

Okey finally i got it working

#

In fact i have to rebuild

#

After the plugin config

#

Thanks a lot