202ecommerce / paypal

This repository is for developpers only. To install and upgrade the module in a production shop please install the package via PrestaShop Marketplace by following this link:
https://addons.prestashop.com/fr/paiement-carte-wallet/1748-paypal-officiel.html
Academic Free License v3.0
20 stars 31 forks source link

Uncaught Error: paylater is not eligible, and broken display when 4x Paypal is activated #266

Open lmeyer1 opened 1 year ago

lmeyer1 commented 1 year ago

Describe the bug and add screenshots

On a shop domiciliated in France, with 4x Paypal activated. When accessing from Switzerland, the diplay of the payment options is broken, and in the Developer Console, I get the error Uncaught Error: paylater is not eligible.

2023-08-28_090352

Checking the Terms and Conditions does not change the display.

Expected behavior

The error paylater is not eligible should be catched and the 4x Paypal payment option should not display.

Workaround: hide the broken payment option using CSS:

div:has(+.js-additional-information div[data-container-bnpl]):not(:has(+.js-additional-information div[paypal-bnpl-button-container] div)) .custom-control-label {
  display: none;
}

Steps to reproduce

  1. Enable 4x Paypal in a shop domiciliated in France
  2. Access the shop from Switzerland as a customer
  3. Notice the brocken display during payment method selection in checkout.

PrestaShop version(s) where the bug happened

8.0.4, paypal 5.7.5, theme: classic_rocket

PHP version(s) where the bug happened

8.0