#alez007
1 messages ยท Page 1 of 1 (latest)
Thanks for the info. And just to confirm, are you seeing any errors when nothing happens?
no errors, main problem that I can see, is when I use:
const { error, paymentOption } = await initPaymentSheet then the paymentOption is undefined, this happens when I click the appl epay button
initstripe is called with:
await initStripe({
publishableKey: publishableKey,
merchantIdentifier: "merchant....",
urlScheme: "...",
});
await isPlatformPaySupported returns true
Hello ๐
I feel like there's some confusion here. initPaymentSheet is for PaymentSheet integration and the video you're referencing is Integrating Apple Pay with PlatformPay button
thanks, yes I know, I didn't really find documentation using initPaymentSheet with apple pay WITHOUT StripeProvider
instead of using the StripeProvider, I'm using initStripe
I believe this is the doc for what you want
https://stripe.com/docs/apple-pay?platform=react-native
using StripeProvider OR initStripe doesn't really matter here as they're both used for initialisation (you can use either one). They should have no effect on how PlatformPay button works
https://github.com/stripe/stripe-react-native#stripe-initialization
ok so maybe I'm a bit confused, the docs you provided are on par with the video I've just provided, but, when I use initPaymentSheet like this:
const { error, paymentOption } = await initPaymentSheet({
paymentIntentClientSecret: paymentIntent,
merchantDisplayName: "...",
customerId: customer,
customerEphemeralKeySecret: ephemeralKey,
allowsDelayedPaymentMethods: false,
googlePay: {
merchantCountryCode: "UK",
testEnv: true,
},
applePay: {
merchantCountryCode: "UK"
},
returnURL: '....'
});
I get a big button apple pay on top of the sheet
same with google pay... google pay works fine
I don't want to add a custom button and start apple pay session using it
I want to use the normal sheet that already displays the apple pay button on top
Gotcha. So the video isn't relevant in that case as it adds a Apple/Google Pay button separately.
The guide/doc for PaymentSheet integration is here
https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet
Have you followed all the steps mentioned here?
https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-apple-pay
thanks, not we're getting somewhere ๐ I used those docs for my integration
and yes, all steps are done
Are you testing on a real device or simulator?
real device, simulator won't allow me to add any cards to wallet
If you're able to, can you share a screen recording of what you're seeing when you click on the apple pay button?
It is weird that it fails without any specific error messages
Oh
The country code
merchantCountryCode is set to UK, it should be GB instead
cool, let me try it first, yah I can provide recording