paypal/paypal-android

use “paypal-web-payments” way,the first time it can call back to our app, the second time it can't

Opened this issue · 3 comments

PayPal Android SDK Version

com.paypal.android:paypal-web-payments:1.3.0

Environment

Sandbox

Android Version & Device

android 12

PayPal dependencies

com.paypal.android:paypal-web-payments:1.3.0

Describe the bug

use “paypal-web-payments” way,the first time it can call back to our app, the second time it can't

To reproduce

payPalWebCheckoutClient.listener = object : PayPalWebCheckoutListener {
override fun onPayPalWebSuccess(result: PayPalWebCheckoutResult) {
// order was approved and is ready to be captured/authorized (see step 7)

        }

        override fun onPayPalWebFailure(error: PayPalSDKError) {
            Log.e(TAG, "onPayPalWebFailure error: $error")
           
        }

        override fun onPayPalWebCanceled() {
            Log.e(TAG, "onPayPalWebCanceled")
           
        }
    }

can not listener

Expected behavior

expected result
1
2

fail result
fail

Screenshots

No response

It seems the issue is partly related to the browser that selected to launch the checkout.
Using Chrome and Samsung browser are fine, but some other seems not. Would that possible to pre-select using Chrome to launch the Checkout?

@HoanChen we think this PR may resolve the issues you're having with the follow up transactions

Greetings, I've updated to 1.4.0 and also to 1.4.1-SNAPSHOT and still confront the same issue. The listener, reverts back to the first transaction and the Capture API rejects the transaction because it had already registered it. Going over the notes on the release 1.4.0, it stated that steps were taken to remove observers. This is what PR-251 says is the root cause.
I am working on the Paypal Sandbox environment with a physical Samsung Galaxy S-22 as the testing device.