braintree / braintree_android

Braintree SDK for Android
https://developer.paypal.com/braintree/docs/start/hello-client/android/v4
MIT License
409 stars 234 forks source link

BrowserSwitchResult "User canceled PayPal" even though it was success #588

Open sreereddymenon opened 2 years ago

sreereddymenon commented 2 years ago

General information

Issue description

I have a fragment

sshropshire commented 2 years ago

Hi @sreereddymenon thanks for using the Braintree SDK for Android. Can you provide steps to reproduce this issue so we can diagnose further?

It may also help to see a code snippet of your app's PayPalClient creation to help find the root cause of the false cancelation.

Hector1990 commented 2 years ago

I think this can be reproduced by:

  1. Complete the payment in paypal page, don't back to the app by deeplink.
  2. Return to their app by switching manually.
sshropshire commented 2 years ago

Thanks @Hector1990. Can you provide a video showing the issue? The deep link should automatically bring you back to the application after completing the PayPal flow.

Hector1990 commented 1 year ago

I provided the video here: https://github.com/braintree/braintree_android/issues/611

sshropshire commented 1 year ago

@Hector1990 thanks that video is for the popup dialog. This seems to be a separate issue where the user isn't automatically redirected back to the application? Would you consider this a duplicate of #611?

Hector1990 commented 1 year ago

@sshropshire Sorry for that. They are two issues. I provided the video because if the deep link is not triggered automatically, you can manually switch to your app. And if your activity is not singleTop or singleTask, the canceled result he mentioned would be triggered.

sshropshire commented 1 year ago

@Hector1990 got it yeah that's interesting. Does it just hang? Do you have a video of the deep link not being triggered automatically? Only asking because I haven't seen this happen in or Demo application yet.

sshropshire commented 1 year ago

Hi @Hector1990 does this issue still occur in the latest 4.26.1 version?

Chaos2805 commented 1 year ago

@sshropshire I hit it in latest drop in version - 6.11.0, which include 4.33.0

liucaizhong commented 4 months ago

Are there any updates for this feature? @sshropshire @sarahkoop Some GA merchants think if automatic redirection is not realized, it will impact the conversion rate.

tdchow commented 3 weeks ago

Hi all - We just released the GA version of v5! In this version, the interface has been updated to give the additional browser switch flexibility. Would you be able to try out v5 and see if the issue is resolved?

Releases: https://github.com/braintree/braintree_android/releases/tag/5.0.0 v5 Migration Guide: https://github.com/braintree/braintree_android/blob/main/v5_MIGRATION_GUIDE.md