Luehang / react-paypal-button-v2

An easy and simple to use React button component to implement PayPal Checkout with Smart Payment Buttons V2 (Version 2).
https://luehangs.site/lue_hang/projects/react-paypal-button-v2
MIT License
273 stars 81 forks source link

[FEATURE REQUEST] PayPal button was unable to be loaded #40

Open ctsimpouris opened 4 years ago

ctsimpouris commented 4 years ago

Is your feature request related to a problem? Please describe. It is something between a bug and a feature request. We want the handle the case "PayPal button was unable to be loaded". Currently it throws console error "Paypal SDK could not be loaded." (index.tsx:221).

Describe the solution you'd like Do not throw a Javascript error. Use the already provided prop onError or catchError (which I don't know exactly their difference)

Describe alternatives you've considered I believe the proposed solution is good enough.

OcaOcaD commented 3 years ago

Same thing is happening to me. It worked yesterday and nhanges were made.

OcaOcaD commented 3 years ago

Hey, the solution for me was to delete de /node_modules and do a new npm install. Hope this helps