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

[BUG]: Paypal buttons not rendering #515

Open
2 tasks done
rash09 opened this issue May 3, 2024 · 10 comments
Open
2 tasks done

[BUG]: Paypal buttons not rendering #515

rash09 opened this issue May 3, 2024 · 10 comments

Comments

@rash09
Copy link

rash09 commented May 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

🐞 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

  • I agree to follow this project's Code of Conduct

➕ Anything else?

No response

@wesbos
Copy link

wesbos commented May 3, 2024

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
Copy link
Member

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
Copy link
Member

wsbrunson commented Jun 10, 2024

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

@wsbrunson wsbrunson transferred this issue from paypal/react-paypal-js Jun 10, 2024
@josephmarkus
Copy link

Same here

@naamhaiabdullah
Copy link

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
Copy link
Member

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

Screenshot 2024-06-24 at 17 46 14

@naamhaiabdullah
Copy link

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
Copy link

KthProg commented Aug 15, 2024

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: #461

@naamhaiabdullah
Copy link

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

@nam-truong-le
Copy link

I have the same issue, sdk is loaded but nothing is shown:

const [{ isPending, isRejected, isInitial, isResolved }] = usePayPalScriptReducer();

  return (
    <>
      {isPending && <Typography>Loading payment method...</Typography>}
      {isRejected && <Typography>Failed to load payment method. Please try again later.</Typography>}
      {isInitial && <Typography>Loading payment method...</Typography>}
      {isResolved && <Typography>Payment method loaded.</Typography>}
      <PayPalButtons

usePayPalScriptReducer returns isResolved=true but nothing to see on the page:

Bildschirmfoto 2024-09-24 um 01 26 34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants