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

The PayPal button does not appear the 2nd time #167

Open
tayyab-salman opened this issue Dec 22, 2024 · 2 comments
Open

The PayPal button does not appear the 2nd time #167

tayyab-salman opened this issue Dec 22, 2024 · 2 comments

Comments

@tayyab-salman
Copy link

tayyab-salman commented Dec 22, 2024

Describe the bug
The PayPal button does not appear the 2nd time.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the PDP and add a product to the basket.
  2. Refresh the page and go to the checkout page.
  3. Enter the required information and go to the payment section.
  4. Note that the PayPal button from Adyen will be displayed.
  5. Click on the Cart button.
  6. Now go to the Checkout page again.
  7. Notice that the PayPal button will not render this time.

Expected behavior
The PayPal button should be rendered the 2nd time.

Screenshots
image

This is critical. You may require a release to fix it. But please let us know what we need to change on our end to have this fixed.

@tayyab-salman tayyab-salman changed the title The PayPal button does not appear the 2nd time [Critical] The PayPal button does not appear the 2nd time Dec 22, 2024
@olga-adyen
Copy link
Contributor

Hi @TayyabSalmanMRM1996

thank you for reporting the bug, we will look into it.

Best,
Adyen team

@tayyab-salman
Copy link
Author

tayyab-salman commented Dec 23, 2024

@olga-adyen - I see this happening because of the line: window.paypal = undefined in adyenCheckout.jsx.

You'll need to remove this. Any idea, why this line was written?

If you intend to remove the svg, you should use the following:

if (window?.paypal?.firstElementChild) { window.paypal = undefined }

@tayyab-salman tayyab-salman changed the title [Critical] The PayPal button does not appear the 2nd time The PayPal button does not appear the 2nd time Dec 23, 2024
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

No branches or pull requests

2 participants