Closed StefanWallin closed 8 months ago
Thought I might as well add my relevant files so that there are no questions about those taking time:
Hey @StefanWallin
Unfortunately logs screenshot is not clickable (odd GitHub behaviour). Could you attach it or add as text?
I see that in your repo's package.json
you are pointing to
"@adyen/react-native": "1.2.0",
But code snippets above is develop
branch (a.k.a v2.0.0 BETA).
It should not be the problem, since "advanced flow" on v2 expected to be compatible with "default" v1 approach.
git clone https://github.com/StefanWallin/AdyenAndroidRedirectBugRepro/ (see commits for detailed changes)
I also wan't able to reproduce this behaviour with repo above 😅
I found the issue, it was unclear from documentation on this packages README that the returnURL value must come from the callback data, we had it passed as it is defined for ios to the payments endpoint.
So I guess the resolution to this bug is better readme 🤣
Hey @StefanWallin
Unfortunately logs screenshot is not clickable (odd GitHub behaviour). Could you attach it or add as text?
Sure!
Hey @StefanWallin
Thanks for feedback! We will improve our documentation 💚
the returnURL value must come from the callback data
Indeed. On Android, DropIn is launched as an Activity with its own Intent Filter
. This intent filter's scheme is calculated automatically per app to improve security and avoid collisions with other apps using Adyen SDK.
To handle redirect back properly we provide the correct returnURL
in PaymentMethodData.returnURL
based on the chosen payment method.
Also, under the hood, we are using DropIn to power some of the Components. This can lead to a situation when within one integration merchant will need to provide one of two return URLs to Adyen API. Relying on PaymentMethodData.returnURL
allows your backend to stay mobile-platform-agnostic :)
Thanks again @StefanWallin
I am going to close this one. Feel free to re-open or continue any further discussions
Describe the bug I've gotten payment method tokenization (because we use card on file to process payments in backend due to external events) to work in my app in iOS and android with the drop-in components. While pennytesting in beta we found out that we might need redirect-support in addition to 3DS2 native. So while implementing that I'm having some issues to get
didProvide
callback getting called when coming back to app from redirect challenge flow on android only.What I've done: 1. Minimal reproduction repo I've tried to create a minimal reproduction repo but failed. So I'm wondering if you know of anything to look at to debug the issue that the DropInActivity is not binding back when resuming the app via link-open.
2. Separate launch activitiy I've tried to implement this separate launch activity mentioned by pinpong in #163 without success.
3. Double and triple checked
MainActivity.java
MainApplication.java
android/app/build.gradle
AndroidManifest.xml
4. Test installing expo modules I thought expo modules might be my bad guy because it lifecycle handlers injects:
5. Test rerender components My component rerenders, but that's covered by
useCallbacks
and cachingpaymentMethods
None of these things solve it in my production app or makes the problem reproducible in my reproduction repo.
To Reproduce
Annoyingly I'm not able to reproduce the issue outside my app.
Steps to reproduce the behavior:
git clone https://github.com/StefanWallin/AdyenAndroidRedirectBugRepro/
(see commits for detailed changes)cd AdyenAndroidRedirectBugRepro
npm install
npm run android
a
in console to start android on emulatorsrc/Configuration.js
ADVANCED CASE
DROP IN
Expected behavior I expect to see these loglines in my app. But for some reason I don't which makes it such that we never get the intent fired and thus no didProvide callback causing the payment to fail.
Screenshots Here below are two logcats, from my reproduction app attempt and from our app.
In the image above the part within the turqoise box and above is very similar between my test-apps, but the purple box does not show up on my real app.
Smartphone:
Additional context Add any other context about the problem here.
My PSP references are listed in case 00064305 with adyen support