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

Support onCancel listener #131

Open omarryhan opened 1 year ago

omarryhan commented 1 year ago

Hey, the original JS PayPal button supports an onCancel event handler, however the one in this lib doesn't, would be great if this lib can support this. Thanks! 🙏

onCancel docs: https://developer.paypal.com/sdk/js/reference/#oncancel

omarryhan commented 1 year ago

Oh, my bad I see it was added a 2 years ago, but the package hasn't been updated on npm for a while. https://github.com/Luehang/react-paypal-button-v2/blame/40f2c152e07ba099081e5990219874bbbbee3ff8/src/index.tsx

I'm open to helping you maintain this lib, lmk @Luehang :)

oihamza commented 1 year ago

+1 on this @Luehang!

Would be super helpful to have this feature to know when the payment drawer is closed/cancelled.