Adyen / adyen-react-native

Adyen React Native
https://docs.adyen.com/checkout
MIT License
42 stars 32 forks source link

AdyenAction.handle does not close PayPal when select 'Open with Always' #448

Closed RyanLinXiang closed 1 month ago

RyanLinXiang commented 1 month ago

Describe the bug When I choose PayPal as payment option and process the payment via AdyenAction.handle, then the first time I need to choose between "Open with myapp once" or "Open with myapp always". If I choose the first one, PayPal will close and return to the app. Though payment was successful, I will get the following warning: Error parsing redirect result, could not any query parameters. What is this?

When I choose the latter one, PayPal will just show the spinning wheel - though the payment was successful. See attached screenshot. How is this possible? What can I do? Thanks!

Screenshot_20240522_172115_Android System

Screenshot_20240522_235300_Chrome

descorp commented 1 month ago

Hey @RyanLinXiang

If I choose the first one, PayPal will close and return to the app.

This means that redirect was passed to the app, onNewIntent was triggered and passed to AdyenCheckout.handleIntent(intent). After that await AdyenAction.handle(xxx) promise will either return ActionComponentData or Exception.

Though payment was successful, I will get the following warning:

AFAIK PayPal will only be concluded after payment\details call is submitted.

What is this?

The error is coming from Android SDK and states that intent filter had no query parameters.

BTW, Thanks for feedback 💚 Android team will fix the exception message.

When I choose the latter one, PayPal will just show the spinning wheel

This seems like redirect didn't happen or was ignored.


Do you have multiple activities with the same in your AndroidManifest? Or you have 2 apps with similar filters on your phone/emulator?

I can suggest to make a breakpoint in onNewIntent and check what does intent.data contains?

RyanLinXiang commented 1 month ago

Hey @descorp Thank you very much!

Regarding the multiple activities - it turns out that I needed to change the scheme because somehow my previous scheme - before the update to 2.0.0-rc1 - interfers with other schemes using my application id. I have no clue why this is the case, but for now I can live with it.