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

Does not support OnCancel #34

Open sdemooy opened 4 years ago

sdemooy commented 4 years ago

Hi,

Can you consider adding the OnCancel event handler? Currently when I close the PayPal popup I do not get an event that the PayPal window closed.

sam

sdemooy commented 4 years ago

Hi,

Here is the change I may in the code in my node_modules folder that allows me to handle onClose.

sam

index.zip

jelinski commented 4 years ago

I also struggle with missing onCancel event. Additionally the documentation incorrectly states that it's supported: https://github.com/Luehang/react-paypal-button-v2#large_blue_diamond-props which makes things even more confusing.