#maxine

1 messages ยท Page 1 of 1 (latest)

grim hazelBOT
swift smelt
#

Hello @serene knoll I created this thread for further discussion

#

One case is about an issue we are running into with Apple Pay. A user will try to check out with Apple Pay and it will fail multiple times or get stuck loading infinitely.
The other case is about an issue we are running into with the Checkout Element display. We disabled Link and Bank payment methods everywhere in our Stripe configurations (and do not specify it anywhere in the code), but we are still seeing the Link and Bank options showing up.

#

Thank you for those IDs. Happy to help look in to these.

Apologies that you got passed back here. They should have been able to pass your existing conversation to the right people without directing you here.

#

Going to start with the second question first and then we can look in to the first one. Can you tell me a bit about how you initiate these payments here? Do you create the payment intent directly or are you using Checkout Sessions or something like them?

serene knoll
#

we create the payment intent directly. We actually create a subscription with payment_behavior: default_incomplete so that we can get the payment intent for that subscription

swift smelt
serene knoll
#

ah yes ๐Ÿ‘€ will disable those methods here! TYSM first one was a quick fix! How is this page different from all the other pages we disabled Link on?

#

i.e. is there no central control of whether Link is turned on across payment types?

swift smelt
#

Great to hear! That other page is for your payment method settings for Stripe Checkout and the Payment Element. Our subscription + invoice products use a different set of settings (honestly not sure why, I am guessing enough users must use both and want different options)

#

Do you have a link where I can see the loading issue?

serene knoll
#

Do you see the screenshot in the case notes for the Apple Pay bug? Otherwise, I can reenable Apple Pay in our production checkout flow for a moment so you can see it happening if that would be helpful.

swift smelt
#

Gotcha, will look at the screenshot and get back to you

#

And can you tell me about how it fails? Is it failing to load or is it loading but failing to make payments?

serene knoll
#

The apple pay option is loading on the payment element, but it fails to make payments. There are no errors in the Stripe logs when the failure happens. Sending more info below:

#

Screenshot above after a failure on the frontend. When we try to confirmPayment, we receive the following error from Stripe: Something went wrong. Unable to show Apple Pay. Please choose a different payment method and try again.

For example, for this test user (if you're able to see the Stripe dashboard: https://dashboard.stripe.com/customers/cus_NV5AfxBZzxR2l4), we submitted Apple Pay and got the error above twice before it finally went through. However, we saw no error logs within Stripe indicating what may have happened.

swift smelt
#

Interesting, and for cus_NV5AfxBZzxR2l4 did you reload the page or did you just have to retry three times and eventually the payment went through?

serene knoll
#

the latter (retry three times)

swift smelt
#

Gotcha. I do see the error about calling show() from a gesture handler. Are you directly calling show here?

#

Alternatively do you know if your page makes some web request after the user clicks pay but before your code calls our confirm function?

serene knoll
#
  1. not calling show. 2. yes, we make one web request between clicking pay and calling Stripe's confirmPayment function.
hot bolt
#

Hello ๐Ÿ‘‹
Taking over as Pompey needs to step away soon

#

Apple has some restrictions on how long a request should take to invoke apple pay after a handler is fired.
Your code that runs in between you clicking pay and confirmPayment pretty much violates those restrictions.

If you remove the API call in between and test, you should be able to get this working..

#

The reason it works randomly is because those async requests might finish faster just in time to meet Apple's requirements

serene knoll
#

๐Ÿ‘‹ ty for stepping in. ahhhh -- is that the issue? This is running up against Apple's requirements?

hot bolt
#

I believe so, that's why you're probably seeing that IntegrationError w/ show() must be called ....

serene knoll
#

Will try that fix now and report back shortly! TYSM

hot bolt
#

NP! ๐Ÿ™‚ Good luck

serene knoll
#

@hot bolt , could you link to the relevant documentation about this so we make sure not to miss this in the future?

hot bolt
#

Unfortunately, I don't think we have any public docs for this. I'll flag this internally to see if we can add a reference to this in our public docs.

serene knoll
#

Appreciate it! Thanks

#

Actually, does Apple have this documented somewhere you know of?

hot bolt
#

I don't think Apple has this documented anywhere either. Its mostly buried deep into webkit source code.

serene knoll
#

hahah classic. Well thank you again!