#alez007

1 messages ยท Page 1 of 1 (latest)

sonic steppeBOT
tired inlet
#

Thanks for the info. And just to confirm, are you seeing any errors when nothing happens?

fresh slate
#

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

valid pewter
#

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

fresh slate
#

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

valid pewter
fresh slate
#

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

valid pewter
fresh slate
#

thanks, not we're getting somewhere ๐Ÿ™‚ I used those docs for my integration

#

and yes, all steps are done

valid pewter
#

Are you testing on a real device or simulator?

fresh slate
#

real device, simulator won't allow me to add any cards to wallet

valid pewter
#

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

fresh slate
#

cool, let me try it first, yah I can provide recording

valid pewter
fresh slate
#

๐Ÿ’ฅ that was it!!!

#

replacing UK with GB fixed it

#

thank you ๐Ÿฆพ

valid pewter
#

NP! ๐Ÿ™‚ Happy to help

#

Closing the thread as I need to step away ๐Ÿ‘‹
Feel free to reach out to us in #dev-help should you have any follow ups