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

passing custom parameters #48

Open tssdsta opened 4 years ago

tssdsta commented 4 years ago

Is it possible to pass custom parameter such as product-id to paypal while calling CreateOrder and receive it back when approved or error encountered?

thomath47D commented 4 years ago

is it possible? I am also facing the same issue. Any help appreciated

SirSerje commented 4 years ago

@tssdsta @thomath47D Looks like - no. Take a look at file src/index.tsx, there are you have PayPalButtonProps, PayPalButtonState, PaypalOptions & propTypes, which describes all data passing into component. You can try to find your solution with option prop, which forms query string for request.

thomath47D commented 4 years ago

Anyone find a solution for this. ? I want to pass the productId to CreateOrder

thomath47D commented 4 years ago

@SirSerje thanks man. Editing the src/index.tsx works fine