Fire a callback when payment canceled by shopper
Is your feature request related to a problem? Please describe. We'd like to use Klarna as one of the payment methods in the dropIn. The steps leading to the problem are:
- I open the dropIn
- I press
klarnaoption -> The in-app browser is opened - I press "Cancel" on the top-left corner -> the browser is closed
So my question is: is it possible to react somehow on this last event? We'd like to perform certain actions when user manually closes the browser.
I tried to subscribe to focus/blur event of react-navigation, but surprisingly it didn't work as well.
Describe the solution you'd like Maybe having a callback passed to AdyenCheckout to handle browser being closed.
Describe alternatives you've considered Or having onFail called. Or maybe I'm missing something. If that's so, please tell me, I'd appreciate any feedback.
SS

Hey @iszhuravlev
Thank you for a feedback! This is possible on iOS DropIn but not on Android DropIn
We will check with Android Team and will keep you posted!
As a temporary workaround you can use standalone klarna, in this case when shopper cancel the payment - you will receive didFail with "canceledByShopper"
@descorp I patched the library and it worked, thank you! Looking forward for the news about Android :)
@descorp Do you have any updates for this?
Hey @iszhuravlev
Thanks for checking!
Callbacks for Android are on our backlog but there is no expected timeline.
As a suggestion, your backend can implement Notification webhooks to control the payment state. Use merchantReference as a unique ID.
If you have issues with this - please reach out to the support team
In the latest v2 redirects we introduced "gatekeeper" dialog to verify shopper canceling the transaction.
@iszhuravlev How did you fix this issue?
Hey @anthlasserre
the callback mentioned above is not yet part of React Native SKD. What issue are you facing?
@descorp It would be useful to know when payment process is canceled by the user so editing of order products quantities or any other order info could be enabled again in the form...
@iszhuravlev How does the android patch look like? Can you help with sharing it or opening a PR?