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

Fix PayPal popup infinite loading spinner if T&Cs are not checked #2659

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Axel29
Copy link

@Axel29 Axel29 commented Jun 21, 2024

Description

Add onInit and onClick functions to the configuration object in order to maange the PayPal Buttons state (enabled / disabled) depending on the checkout agreements checkbox state.

Without these functions, if the form is not valid (checkbox unchecked) and the user clicks on the PayPal button, the popup will be opened with an infinite loading spinner, and even if the customer closes the popup, checks the checkbox and clicks again on the PayPal button, the popup will not work anymore, until the page is reloaded.

Tested scenarios

  1. Enable Terms and Conditions in Magento's configuration (Stores > Configuration > Sales > Checkout > Checkout Options > Enable Terms and Conditions).
  2. Create Terms and Conditions in the administration (Stores > Settings > Terms and Conditions) and set them as required.
  3. Enable PayPal in Adyen
  4. Go to the checkout
  5. Click on the PayPal button that should open a PayPal popup without clicking the Terms and Conditions

Expected result

  • PayPal popup should not be opened
  • The form should display an error message bellow the terms and conditions
  • After checking these terms and conditions, the user should be able to open the PayPal popup by clicking on the CTA again

Fixes #2613

… checked

If the checkout form is not valid and the user clicks on the PayPal button, the popup will be opened with an infinite loading spinner.

Event if the customer closes the popup, checks the checkbox and clicks again on the PayPal button, the popup will not work anymore, until the page is reloaded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant