#rabbit-reactnativeexpo-applepay

1 messages ยท Page 1 of 1 (latest)

obsidian ermineBOT
weak terrace
#

@jade heron do you have an exact PaymentIntent id I can look at?

jade heron
#

I think this one: pi_3O9EdwKwGkja34pa1vCgcrFY

It's payment in test environment.

weak terrace
#

rabbit-reactnativeexpo-applepay

jade heron
#

Additional info, payment using card works without any issue.

placid terrace
#

๐Ÿ‘‹ are you using a development build?

jade heron
#

yes

placid terrace
#

Yep that's correct

#

Also can you show me your code for confirmPlatformPayPayment?

jade heron
#

basically I am threating confirmPlatformPayPayment or confirmPlatformPaySetupIntent as exactly same functions which maybe wrong of me. But I am doing brute force attempt on whatever works.

So code for usage of confirmPlatformPayPayment would be same as I sent before but confirmPlatformPaySetupIntent is replaced with confirmPlatformPayPayment

placid terrace
#

Ah I missed the code file above, sorry.

#

Looking

placid terrace
#

It is in test mode so you won't be charged

#

But can you confirm that your device can successfully go through that flow?

jade heron
#

yes, it goes through the flow

placid terrace
#

Thanks

jade heron
#

I mean by card

#

but when I click pay it fails just with an error

#

if say alert and console in my code

placid terrace
jade heron
#

the error I receive I have posted above

placid terrace
#

Can your device complete an Apple Pay payment at that link in safari?

jade heron
#

it did work

#

I do use my apple pay daily, and I am from London, UK.

placid terrace
#

๐Ÿ‘

#

You said:

basically I am threating confirmPlatformPayPayment or confirmPlatformPaySetupIntent as exactly same functions which maybe wrong of me. But I am doing brute force attempt on whatever works.
Is there a chance you are calling both of these functions at the same time? That is possibly the reason you are seeing the "payment is canceled" error.

jade heron
#

no cause I was getting the same error with just one of them

#

I didn't called them at the same time

#

everytime I replaced and made sure only one of them is called.

placid terrace
#

Hmm okay. And to be clear, the Apple Pay payment modal opens but it is when you attempt to authorize that the error happens?

#

Or this error occurs when you attempt to open the payment sheet?

jade heron
#

no, when I click apple pay button which is rendered but I don't get to see wallet to pay with

placid terrace
#

Okay so it errors immediately

jade heron
#

yeap

#

and no logs on stripe is traced

placid terrace
#

Is there any other alert or anything that would be happening at the same time in your code?

#

Like something is causing the sheet to dismiss...

jade heron
#

I have isolated my code so there is only 3 things happen

#
  1. isPlatformPaySupported return true
#
  1. fetch client secret and create payment intent or update intent
#
  1. call pay button that fails
obsidian ermineBOT
placid terrace
#

I assume you are on this SDK version becuase you are pinned to Expo 48?

#

That is a decently old version of the SDK at this point... would be good to upgrade

jade heron
#

yes it is

#

but this version should work

placid terrace
#

Yes, just harder to debug mostly

jade heron
#

I will but for now I need to resolve

placid terrace
#

I'm still looking/thinking

#

Nothing jumping out at the moment

#

I'm trying to reproduce but I can't - my sample is on 0.33.0 though

#

But really your code seems fine

#

Something is auto closing the sheet

#

Do you see it attempt to open at all?

#

Like does it blip opening and closing?

jade heron
#

how exactly expo 49 gives more debugging capabilities?

#

or is there version 50 or 51?

placid terrace
#

Really you want to upgrade your Stripe React Native SDK to 0.34.0

#

I'm actually not intimately familiar with Expo as I always just build via the RN CLI

#

But I think there is a way to not have to be pinned to a version and upgrade your Stripe React Native SDK?

#

You also have double checked that your merchant ID is set up correctly in both your config plugin and your <StripeProvider /> component, yes?

#

Really you would be getting a different error though if that wasn't the case...

#

The real issue is something is grabbing focus away from the Apple pay payment sheet

#

Like it is opening since it gets to the part of the code where it then errors due to being closed...

#

As those were added in 0.33.0