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] Error: Paypal SDK could not be loaded. #115

Open
anibaljasin opened this issue Sep 15, 2021 · 6 comments
Open

[BUG] Error: Paypal SDK could not be loaded. #115

anibaljasin opened this issue Sep 15, 2021 · 6 comments

Comments

@anibaljasin
Copy link

To Do First

  • [ yes] Did you try latest release?
  • [ yes] Did you look for existing matching issues?

Software Package Version:
"react-paypal-button-v2": "^2.6.3",

Describe the bug
I copy and paste the example to add a subscription and every time it shows the error: Error: Paypal SDK could not be loaded.

To Reproduce

  1. Copy the subscription example in a react app
  2. Execute the code

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser: chrome
  • React Version: ^17.0.2
@anibaljasin anibaljasin changed the title [BUG] [BUG] Error: Paypal SDK could not be loaded. Sep 15, 2021
@ilchenkoArtem
Copy link

I have this error too. Started to display 6-7 hours ago

@drupov
Copy link

drupov commented Oct 22, 2021

Same here. The examples for single payments work just fine.

I need to add

<script src="https://www.paypal.com/sdk/js?client-id=my-client-id&currency=EUR&vault=true"></script>

to my public/index.html in my React app to get subscriptions to work, but that is not needed for single payments.

@drupov
Copy link

drupov commented Oct 22, 2021

Found the missing part. Actually the example for subscription does not say that you need to pass the client-id to the options of the PayPalButton-component:

import { PayPalButton } from "react-paypal-button-v2";

export default class Example Component {
  render() {
    return (
    <PayPalButton
      options={{
        "vault": true,
        "client-id": "test"
      }}
...

For once-payments this value is probably set to "client-id": "test" already.

@Nando-C
Copy link

Nando-C commented Nov 30, 2021

I have this same issue but only when running my app in Safari 15.1 , it works fine in chrome! 🤔

@peciulevicius
Copy link

peciulevicius commented Nov 30, 2021

I have this same issue but only when running my app in Safari 15.1 , it works fine in chrome! 🤔

It's really strange to be honest. I've spent way to much time on this. Doesn't work on either chrome or safari on macOS for me, but works on Brave.

Tried running the same application on my windows machine (Brave, Chrome, Firefox), and it seems to work fine there on all browsers.

Seems like it has something todo with browser configuration / add blockers or something. Will try investigate this further later this week when I have the time.

@evakhovsky
Copy link

For me it turned out to be a legitimate issue. For some unknown reasons my WiFi and the internet T-Mobile modem stopped working with PayPal. It worked ok after rebooting the modem. Very weird.

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

6 participants