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
274 stars 81 forks source link

Feat: add createBillingAgreement prop #108

Closed holdMyTea closed 3 years ago

holdMyTea commented 3 years ago

Trying to add a createBillingAgreement w/o these changes throws the following error:

Uncaught Error: Do not pass both createBillingAgreement and createOrder

So I've added the prop to prevent the default createOrder being passed if createBillingAgreement is present.

Works well on my test environment setup, I'm receiving back valid data and action params in the callback.

holdMyTea commented 3 years ago

UPD: we're currently on prod with this for more than a week, everything seems to be working fine.