braintree / braintree-android-drop-in

Braintree Drop-In SDK for Android
https://developers.braintreepayments.com/guides/drop-in/android/v2
MIT License
124 stars 78 forks source link

6.5.1 PayPal not working #377

Closed molchanovskiy closed 1 year ago

molchanovskiy commented 1 year ago

PayPal always gives UserCanceledException and onDropInSuccess is never called.

        val dropInRequest = DropInRequest()
        dropInRequest.isVaultManagerEnabled = true
        val payPalRequest = PayPalVaultRequest()
        dropInRequest.payPalRequest = payPalRequest
        .......
        dropInClient.setListener(PaymentDropInListener())
        dropInClient.launchDropIn(dropInRequest)

Could you check what is wrong?

I had tested with PayPalClient and it works fine, the issue only exist when using DropInClient

sshropshire commented 1 year ago

Hi @molchanovskiy thanks for using the Braintree SDK for Android. Are you instantiating the DropInClient and setting its listener in your Activity / Fragment's onCreate() method?

molchanovskiy commented 1 year ago

@sshropshire Yes, credit card and google pay works great, the issue only occurs with PayPal.

sshropshire commented 1 year ago

A few questions:

Also, can you provide a video of the unexpected behavior so we can better assist with debugging?

sshropshire commented 1 year ago

@molchanovskiy this integration pattern could cause unpredictable behavior.

molchanovskiy commented 1 year ago

@sshropshire Android 10 API 29, Emulator Credit Card and Google Pay is working great every time, I had tested 20+ times. But PayPal is always giving UserCanceledException once redirected back to the app after tapping Agree on the PayPal website.

molchanovskiy commented 1 year ago

@sshropshire PayPal works fine on device, thank you!

sshropshire commented 1 year ago

Awesome! Closing this for now. Feel free to reopen this if you encounter the issue again.

Going forward, if you'd like to share more about your use case, we are coming up on a next-major-version. We'll soon reopen this discussion to solicit feedback from the community on our API in an effort to offer the best possible developer experience.