Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire a callback when payment canceled by shopper #112

Open
iszhuravlev opened this issue Dec 30, 2022 · 7 comments
Open

Fire a callback when payment canceled by shopper #112

iszhuravlev opened this issue Dec 30, 2022 · 7 comments
Labels
enhancement New feature or request missing on Android This feature is missing on latest adyen-android

Comments

@iszhuravlev
Copy link

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:

  1. I open the dropIn
  2. I press klarna option -> The in-app browser is opened
  3. 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
screenshot

@iszhuravlev iszhuravlev added the enhancement New feature or request label Dec 30, 2022
@descorp
Copy link
Contributor

descorp commented Dec 30, 2022

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"

@iszhuravlev
Copy link
Author

@descorp I patched the library and it worked, thank you! Looking forward for the news about Android :)

@iszhuravlev
Copy link
Author

@descorp Do you have any updates for this?

@descorp
Copy link
Contributor

descorp commented Jan 12, 2023

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

@descorp descorp added the missing on Android This feature is missing on latest adyen-android label Mar 17, 2023
@descorp descorp changed the title Is it possible to fire a callback when the browser is manually closed? Fire a callback when payment canceled by shopper Jun 1, 2023
@descorp
Copy link
Contributor

descorp commented May 3, 2024

In the latest v2 redirects we introduced "gatekeeper" dialog to verify shopper canceling the transaction.

rn_image_picker_lib_temp_7c6bdc9b-f361-4cac-8003-2ce9863d650d

@descorp descorp closed this as completed May 3, 2024
@descorp descorp reopened this May 3, 2024
@anthlasserre
Copy link
Contributor

@iszhuravlev How did you fix this issue?

@descorp
Copy link
Contributor

descorp commented Sep 2, 2024

Hey @anthlasserre

the callback mentioned above is not yet part of React Native SKD.
What issue are you facing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request missing on Android This feature is missing on latest adyen-android
Projects
None yet
Development

No branches or pull requests

3 participants