Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not restrict other payment gateways when customer attempts to checkout using an unsupported currency #853

Open
AashikP opened this issue Feb 19, 2021 · 1 comment
Labels
type: bug The issue is a confirmed bug.

Comments

@AashikP
Copy link

AashikP commented Feb 19, 2021

Describe the bug

With PayPal Checkout enabled, if a customer attempts to checkout using an unsupported currency, the extension will not let them enter credit card details on the checkout page.

To reproduce

  1. Create a test site with ZAR as the base currency.
  2. Install and configure the Stripe gateway and the WooCommerce PayPal Checkout gateway.
  3. Try to buy a product on the frontend. The Stripe fields will appear disabled on the checkout page. The browser console will show several errors, all coming from the PayPal Express Checkout plugin :
jquery-migrate.min.js?ver=3.3.2:2 JQMIGRATE: Migrate is installed, version 3.3.2
js:1 Failed to load resource: the server responded with a status of 400 ()
wc-gateway-ppec-smart-payment-buttons.js?ver=2.1.1:50 Uncaught TypeError: Cannot read property 'FUNDING' of undefined
    at String.<anonymous> (wc-gateway-ppec-smart-payment-buttons.js?ver=2.1.1:50)
    at Function.each (jquery.min.js?ver=3.5.1:2)
    at getFundingMethods (wc-gateway-ppec-smart-payment-buttons.js?ver=2.1.1:49)
    at render (wc-gateway-ppec-smart-payment-buttons.js?ver=2.1.1:102)
    at HTMLBodyElement.dispatch (jquery.min.js?ver=3.5.1:2)
    at HTMLBodyElement.v.handle (jquery.min.js?ver=3.5.1:2)
    at Object.trigger (jquery.min.js?ver=3.5.1:2)
    at HTMLBodyElement.<anonymous> (jquery.min.js?ver=3.5.1:2)
    at Function.each (jquery.min.js?ver=3.5.1:2)
    at s.fn.init.each (jquery.min.js?ver=3.5.1:2)

https://d.pr/i/w1fWQ7+

This can also be replicated with WooCommerce Payments instead of the Stripe extension. PayPal checkout does block the customer from entering credit card fields to the checkout page.

Expected behavior

If the customer is attempting to checkout using a currency not supported by PayPal, just hide the payment gateway and do not interfere with other payment gateways that do support the currency.

Environment (please complete the following information):

  • WordPress Version: 5.6.1
  • WooCommerce Version: 5.0.0
  • PayPal (Express) Checkout Plugin Version: 2.1.1
  • Browser [e.g. chrome, safari] and Version: Chrome
  • Any other plugins installed: N/A

Additional details

On a site with just ZAR set as the base currency, there's no point in enabling the checkout extension because the gateway does not support this currency. However, this becomes a problem on sites that offer multi-currency checkout options for their customers.

@AashikP AashikP added the type: bug The issue is a confirmed bug. label Feb 19, 2021
@jorgeatorres jorgeatorres self-assigned this Feb 19, 2021
@squilib
Copy link

squilib commented Mar 22, 2021

I reported the problem the first time on worpress.org more than 1 month ago. The base currency of my shop is in euro (not ZAR).
My customers from South Africa can't checkout with PayPal or Stripe.
PayPal checkout does block the customers from entering credit card fields to the checkout page (see the attachment)
Thank you
stripe

@jorgeatorres jorgeatorres removed their assignment Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

3 participants