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

[FEATURE REQUEST] Exchange Rate on Callback? #28

Open stinkidog opened 5 years ago

stinkidog commented 5 years ago

Great library!

I'm wondering if there's a solution to the following issue I'm having (which I'm sure others will encounter).

My PayPal is in GBP, but my app accepts international payments using their local currency. PayPal automatically converts incoming payments using an exchange rate, which is amazing.

However I want to process the exchanged value in the callback from paypal, but it only offers me the amount that was entered in the original currency.

I've seen somewhere there may be an option to get the exchange rate used in the callback, but I find PayPals documentation a little hard to follow, and someone here may have a better idea.

Willing to help with the work and pull request in if guided in the right direction!