woocommerce / woocommerce-gateway-stripe

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

Google Pay Test Cards don't work if Billing First Name and Billing Last Name are required in Checkout form. #2516

Closed Brianmitchtay closed 1 year ago

Brianmitchtay commented 1 year ago

Describe the bug

As mentioned by @tijosh in #2430 here, when using the test cards for Google Pay offered from Google by Joining the "Google Pay API Test Cards Allowlist" group if the site's checkout form has "Billing First Name" and "Billing Last Name" set as required. Testing Payment attempts will fail.

To Reproduce Steps to reproduce the behavior:

  1. Enable Express checkout via Google Pay and Apple Pay in your Stripe settings
  2. Join the Google Pay API Test Cards Allowlist group
  3. Navigate to a single product page or the cart page and attempt to check out using Google Pay
  4. See error, Billing First name is a required field. Billing Last name is a required field.
  5. Note that this error occurs whether the user is logged in or logged out
  6. Using a checkout field editor plugin to make the name fields optional allows the payment to go through.

Expected behavior Google's own testing cards should work to make test payments, despite not having Billing first and last name data associated with the address information.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context This behavior does not appear to effect Apple Pay, or when a user is using their own, valid card for testing with Google Pay

Noted in #2430, but it seems like this may be worth its own issue. Reported to me in 5830664-zen

ryanr14 commented 1 year ago

I am having the same issue using these test cards, but I don't get the same error mentioning Billing first or last name.

Mine says, "Uh oh, developer error!"

https://d.pr/i/nTdHgr Image link: https://d.pr/i/nTdHgr

With Stripe in test mode I can still use Apple Pay and my normal Google Pay cards.

6003780-zen