woocommerce / woocommerce-gateway-stripe

The official Stripe Payment Gateway for WooCommerce
https://wordpress.org/plugins/woocommerce-gateway-stripe/
231 stars 202 forks source link

Selecting Apple Pay / Google Pay from the New Checkout Experience payment options fails to take payment #2573

Closed dominiccarrington closed 1 year ago

dominiccarrington commented 1 year ago

Describe the bug When selecting Apple Pay / Google Pay from the new checkout option and checking out, the Apple Pay / Google Pay payment popup comes up. However, when this is passed, the checkout does not continue.

Apple Pay says that the payment was successful but there is no redirect to checkout success page nor does Stripe records the checkout as a success or even an attempt at payment.

To Reproduce Steps to reproduce the behaviour:

  1. Go to checkout with the new checkout experience.
  2. Choose Apple Pay / Google Pay from the options image
  3. Checkout, Apple Pay / Google Pay won't report any errors but the checkout process doesn't continue.

Expected behaviour Checkout to be successful

Environment:

dankocrama commented 1 year ago

Same problem here any news on this issue all versions of the plugin from 7.0 to 7.2 where tested and all the same problem on multiple website !

dougaitken commented 1 year ago

This seems to happen in both the UPE and the Express Payment button. I test with Google Pay on Chrome desktop and Apple Pay on Safari desktop.

For Google Pay: Tried in test mode and the UPE version fails with this error:

Your request failed. Use a different payment method, or contact us. Learn more [OR-CCSEH-21]

The Express Payment button opens the modal then fails with a small generic error message. For my testing it could be related to my live keys being expired as I tried a live card with the Express Payment button.

Apple Pay, I used UPE and the modal showed success but no redirect to order-received endpoint, no order, draft or otherwise. Only indication was an entry in the Stripe log file:

====Stripe Version: 7.2.0====
====Start Log====
payment_intents request: Array
(
    [amount] => 2000
    [currency] => usd
    [payment_method_types] => Array
        (
            [0] => card
            [1] => link
        )

    [capture_method] => automatic
)

====End Log====
rashedripon commented 1 year ago

6066261-zen

igorhereira commented 1 year ago

6075078-zen

imodouglas commented 1 year ago

6082341-zen 6083139-zen

imodouglas commented 1 year ago

Hi, just checking to see if there is any walkaround for this issue or if there is a specific version that works.

asumaran commented 1 year ago

I got a different error, but it might be related. I'll prepare a quick patch to see if it also fixes this issue. Turns out google_pay is not an option in the upe_checkout_experience_accepted_payments array of accepted payments methods 🤔

Uncaught TypeError: Cannot read properties of undefined (reading 'isReusable')
    at index.js:298:9
    at ?ver=3.0:1:92652
    at Array.forEach (<anonymous>)
    at t._emit (?ver=3.0:1:92593)
    at a._emitEvent (?ver=3.0:1:277293)
    at ?ver=3.0:1:227215
    at ?ver=3.0:1:92850
    at Array.forEach (<anonymous>)
    at t._emit (?ver=3.0:1:92593)
    at e._handleMessage (?ver=3.0:1:309707)
imodouglas commented 1 year ago

6090637-zen

imodouglas commented 1 year ago

6180172-zen

kaushikasomaiya commented 1 year ago

6073013-zen

Merchant reported the below error in console

https://d.pr/i/xQ81JH Full Size: https://d.pr/i/xQ81JH

imodouglas commented 1 year ago

42896303-hc

imodouglas commented 1 year ago

6213939-zen

xue28 commented 1 year ago

6254969-zen

tsetend commented 1 year ago

6341151-zen

fhmomo commented 1 year ago

same issue, any solutions?

segomaster commented 1 year ago

also experiencing this issue.

elementall2 commented 1 year ago

Any news on this? We got the same error, in stripe comes back with " The customer has not entered their payment method. " Wordpress Current version: 6.3.1 Woocommerce Version 8.0.3 Stripe module Version 7.5.0

a-danae commented 1 year ago

đź‘‹ Update over here.

There are a couple of errors that are easily solvable:

After solving those, there’s the tricky one:

The error message on the checkout page saying Something went wrong. Unable to show Google Pay. Please choose a different payment method and try again. - With a browser console error saying Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Delegation is not allowed without transient user activation.

This happens because the wallet’s payment modal must be triggered soon after a user gesture, and we need to run some API requests before the modal is triggered. In some cases, these requests delay displaying the modal longer than what’s allowed by the delegation’s threshold, thus triggering this error.

We’d need to reduce that delay to solve this problem. This likely means moving the API requests before the modal is triggered since we can’t control the time until the API responds. This would deserve a spike because it may or may not be feasible.

In the meantime, it’d be better to let the Express buttons (those at the top of the checkout page) do the wallets’ work for a similar experience to the non-UPE version, and hide those within the Card payment element (those referenced in the GH issue description) which aren’t working as expected.

I’ve created the following issue to document these findings and prioritize the spike as the backlog allows https://github.com/woocommerce/woocommerce-gateway-stripe/issues/2707

a-danae commented 1 year ago

Closing this issue with the following actions:

WillBrubaker commented 10 months ago

Heya @a-danae you mention:

There are a couple of errors that are easily solvable:

There's another error message mentioned in https://github.com/woocommerce/woocommerce-gateway-stripe/issues/2573#issuecomment-1505269907 i.e.

Uncaught (in promise) IntegrationError: You specified "never" for fields.billing_details.name when creating the payment Element, but did not pass confirmParams.payment_method_data.billing_details.name when calling stripe.confirmPayment(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.confirmPayment().;
construct
@ [native code]:
n
@ https://js.stripe.com/v3/:1
construct
@ [native code]:
@ https://js.stripe.com/v3/:1
t
@ https://js.stripe.com/v3/:1
re
@ https://js.stripe.com/v3/:1
@ https://js.stripe.com/v3/:1
@ https://js.stripe.com/v3/:1
@ https://js.stripe.com/v3/:1

Is that covered in the investigation/fix efforts as well?