paypal / paypal-js

Loading wrapper and TypeScript types for the PayPal JS SDK
Apache License 2.0
224 stars 75 forks source link

[BUG]: Paypal buttons not rendering #515

Open rash09 opened 4 months ago

rash09 commented 4 months ago

Is there an existing issue for this?

🐞 Describe the Bug

Have integrated paypal in my SPA react application and in the browser network can see the successful calls by paypal APIs, however, I don't see the buttons displayed on the page. below is the attached screenshot where the div wrapper block has empty class attribute, not sure if that is causing the display issue.

Note: This react application is wrapped with Azure B2C authentication, not sure if that is blocking the buttons as I tested this integration with a simple react application and is working as expected.

😕 Current Behavior

When i load the page, paypal buttons are not visible on the page.

🤔 Expected Behavior

When i load the page , i need to view the paypal buttons

🔬 Minimal Reproduction

No response

🌍 Environment

| Software         | Version(s) |
| ---------------- | ---------- |
| react-paypal-js  |  8.0.5     |
| Browser          |124.0.6367.118         |
| Operating System |   IOS  Ventura 13.6.6 (22G630)         |

Relevant log output

![Uploading Screenshot 2024-05-05 at 9.40.56 PM.png…]()

Code of Conduct

➕ Anything else?

No response

wesbos commented 4 months ago

Edit: never mind - i'm an idiot and changed env variables.

~Mine stopped working today too. Getting a 404 on the paypal SDK load. Same for you?~

Screenshot 2024-05-03 at 10 33 33 AM
wsbrunson commented 3 months ago

hi @rash09 , I don't think your screenshot uploaded. Can you try uploading it again and send over how you are setting up PayPalScriptProvider and PayPalButtons?

wsbrunson commented 2 months ago

We have moved this repository to our paypal-js monorepo: https://github.com/paypal/paypal-js

We will be archiving this repo at the end of the day which will turn off Issues activity. If this is still an issue for you, please re-open this issue here:

Transferring this issue here: https://github.com/paypal/paypal-js/issues

josephmarkus commented 2 months ago

Same here

naamhaiabdullah commented 2 months ago

I am having the same issue. My website's pricing section renders three PayPal button under different plans, but only one renders unless I refresh. Here is the website: https://superdevpro.com

wsbrunson commented 2 months ago

@naamhaiabdullah all three showed up for me without a refresh. What browser are you using?

Screenshot 2024-06-24 at 17 46 14
naamhaiabdullah commented 2 months ago

Hmmm, it's working on Chrome 126 (Stable) and Safari perfectly, the problem is with the Chrome 127 (Beta) I am using. You might need to open this issue with the Chrome team. I have tried clearing all types of cache from Chrome 127 (Beta), still the issue persists.

KthProg commented 3 weeks ago

It looks like you are not passing a client id to those requests, based on the URLs in the error message. However maybe also look at this issue: https://github.com/paypal/paypal-js/issues/461

naamhaiabdullah commented 3 weeks ago

The issue is no longer happening in Chrome Beta 128 on MacOS Sonoma. Maybe you can safely close the issue.