braintree / braintree_android

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

onPayPalSuccess #1035

Closed ISAACJGSANTOS closed 2 weeks ago

ISAACJGSANTOS commented 1 month ago

Braintree SDK Version

com.braintreepayments.api:paypal:4.47.0

Environment

Sandbox

Android Version & Device

emulator pixel 7

Braintree dependencies

paypal:4.47.0

Describe the bug

I'm encountering an issue while testing my PayPal checkout implementation (version com.braintreepayments.api:paypal:4.47.0) in the sandbox environment. The onPayPalSuccess method isn't called when I confirm the payment, but the onPayPalFailure method is triggered with a UserCanceledException if I close the webview. There are also no error logs in the console. Any ideas on what might be causing this behavior?

Screenshot 2024-06-11 at 15 49 34

To reproduce

open webview and click on confirm button

Expected behavior

invoke onPayPalSuccess method

Screenshots

Screenshot 2024-06-11 at 15 49 34
sshropshire commented 1 month ago

Hey @ISAACJGSANTOS thanks for this. What API Version of Android are you using to reproduce this issue?

ISAACJGSANTOS commented 1 month ago

hey @sshropshire I'm using api target 33

sshropshire commented 1 month ago

Thanks @ISAACJGSANTOS I'm having trouble reproducing this in our demo app. Have you tried a physical device as well?

sshropshire commented 2 weeks ago

@ISAACJGSANTOS if your Activity's launch mode is singleTask, please make sure you are overriding onNewIntent() as mentioned in our MIGRATION_GUIDE.

ISAACJGSANTOS commented 2 weeks ago

Hi sshropshire.

Sorry for the late answer, I already fixed the problem and it was related with the launch mode of the activity. Thank you for your help. Have a nice day

On Tue, 2 Jul 2024, 19:29 sshropshire, @.***> wrote:

@ISAACJGSANTOS https://github.com/ISAACJGSANTOS if your Activity's launch mode is singleTask, please make sure you are overriding onNewIntent() as mentioned in our MIGRATION_GUIDE https://github.com/braintree/braintree_android/blob/main/v4.9.0%2B_MIGRATION_GUIDE.md#manual-browser-switching-for-browser-based-flows .

— Reply to this email directly, view it on GitHub https://github.com/braintree/braintree_android/issues/1035#issuecomment-2204025179, or unsubscribe https://github.com/notifications/unsubscribe-auth/APQCWR32EWGWXMKRA2MCNQLZKLWSFAVCNFSM6AAAAABJEUEBESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBUGAZDKMJXHE . You are receiving this because you were mentioned.Message ID: @.***>

sshropshire commented 2 weeks ago

@ISAACJGSANTOS thank you for confirming! We'll go ahead and close this issue out. Please feel free to re-open this issue (or create a new one) if needed.