#happycamper_94472

1 messages · Page 1 of 1 (latest)

tropic rapidsBOT
dark sonnet
#

Hi Pompey!

#

This is the full error object we get back from the call:
{"type":"invalid_request_error","message":"Something went wrong. Unable to show Apple Pay. Please choose a different payment method and try again."}

near fable
#

Hello, apologies for the wait, the server has been pretty busy

#

Not immediately sure what may cause that but I am looking in to it. Do you have a URL for your test site where I could see this error for myself?

#

Can DM me if you don't want to send it in this public thread

dark sonnet
#

Actually, I have a thought. Is domain registration different from domain verifiation for Apple Pay? If I submit a verification domain for Apple Pay, is there a separate step for domain registration?

near fable
#

If you registered the domain for apple pay we should have converted it automatically in to that new type of registration I believe

#

If the Apple Pay button is showing for you, then you have the registration party done correctly

#

Small caveat: if you are browsing in private mode, the button will always show regardless of registration

dark sonnet
#

Ok that makes sense, lastly do you know if there is a separate registartion for the test api key, or is it the same for both environments?

#

I do not get the same error when pressing that button

#

Unfortunately it isn't super easy to share my implementation with you, since it is sort of nested into our checkout flow and requires an authorized user to access

near fable
#

Registering in live registers you for both modes

#

Gotcha, still looking in to this error and will see what I can do

#

Would it be possible to make a simple page that is just the Payment Element to see if that also gives you this error?

dark sonnet
#

I can look into this, give me a few mintues. Thanks!

tropic rapidsBOT
near fable
#

Also do you have the ID of a PaymentIntent that you saw this issue with? (pi_1234)
I can check if there is anything on the logs on our side

dark sonnet
#

Looking now!

#

here is the id of the paymentintent: pi_2Nqc7cmlwWyom0i50Eg25oCK

near fable
#

Not seeing anything strange from the confirm side. I do see a lot of update calls on the PaymentIntent though I don't think that should affect ApplePay here.
Also have you checked your developer console to see if any other errors are showing up?

dark sonnet
#

Mhmm I do see this in my console, though I'm not certain it's from Stripe yet:
IntegrationError: show() must be called from a user gesture handler (such as a click handler, after the user clicks a button).

near fable
#

Ah there we go! So that error comes from an Apple Requirement that the payment sheet has to be displayed soon after the user clicks on a buy button. I think the time limit is ~ 1 second

#

Are these update calls on your server happening after your user clicks the buy button? Or is there other significant work being done?

dark sonnet
#

I am not making any show() calls manually, on the client nor on the server

#

Does the payment element handle this for us?

near fable
#

Yes, show is something Stripe.js is calling as part of the confirmPayment call

#

So I guess my question is if your page is doing anything between when the user clicks your buy button and when you call confirmPayment

dark sonnet
#

ahh I see

#

let me check our code

#

Yes we make a call to our server before calling .confirmPayment. But once we call confirmPayment we aren't doing anything else

#

I can test omiiting that call to see what happens

near fable
#

The call to your server is likely the issue unfortunately. Apple's timing window is usually too tight for networked requests

dark sonnet
#

it wokred!

near fable
#

Nice!

dark sonnet
#

This was an unexpected requirement

near fable
#

Yeah it gets a lot of people. Very tight timing window.

#

So yeah, the solution will be to rework the page such that confirmPayment isn't waiting on that request to finish.

#

I have to step out but @sweet linden can help with followup questions if you run ing to Stripe.js or API questions while looking in to this.

dark sonnet
#

And specifically the window is the click on the checkout button to the call to .confirmPayment?

#

that needs to be a quick turnaround?

near fable
#

Correct

dark sonnet
#

I'm wondering if you have any suggestions for how we can support this requirement without undertaking a major refactor?

sweet linden
#

Hi there

#

Catching up. Give me a moment

dark sonnet
#

thank you!

sweet linden
#

Ah this is the issue with Apple requiring their sheet to be shown within ~1 second of the customer clicking buy

#

There's not a way to circumvent that

#

So you'll have to refactor unfortunately

dark sonnet
#

Understood, thank you for your time and help