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-js new typings (6.0) don't work with react-paypal-js #359

Closed
2 tasks done
TheThirdRace opened this issue Jun 5, 2023 · 3 comments
Closed
2 tasks done

Comments

@TheThirdRace
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

🐞 Describe the Bug

Since paypal-js version 6.0 BREAKING CHANGE for query parameters, they go from kebab to camel case, ex: client-id => clientId, I receive 400 Bad Request when passed the info to PayPalScriptProvider from react-paypal-js package.

When passing the keys in kebab case to PayPalScriptProvider, it works just fine...

It's pretty clear the integration with React wasn't tested when this breaking change was made in paypal-js.

😕 Current Behavior

I get bad request in the network manager:

// react-paypal-js.js:520 
GET https://www.paypal.com/sdk/js?clientId=xxxxxxxxxxxxxxxxxxxx&integrationDate=2021-12-24 net::ERR_ABORTED 400

*I hid the client id on purpose, it's of no consequences here

🤔 Expected Behavior

Passing camel case keys like clientId to PayPalScriptProvider should work.

🔬 Minimal Reproduction

It's pretty straightforward, the React integration was not adjusted after the breaking change from `paypal-js` package. No need for a reproduction.

🌍 Environment

| Software         | Version(s) |
| ---------------- | ---------- |
| react-paypal-js  |            |
| Browser          |            |
| Operating System |            |

Relevant log output

No response

Code of Conduct

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

➕ Anything else?

No response

@TheThirdRace TheThirdRace changed the title [BUG]: [BUG]: paypal-js new typings (6.0) don't work with react-paypal-js Jun 5, 2023
@gregjopa
Copy link
Contributor

gregjopa commented Jun 9, 2023

Hi @TheThirdRace, here's a PR to get react-paypal-js upgraded to use the latest version of paypal-js: #360

@TheThirdRace
Copy link
Author

It does look exactly what we need.

Thanks!

@gregjopa
Copy link
Contributor

react-paypal-js version 8.0.0 has been published. This should resolve the issue. Feel free to re-open if you are still having trouble.

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