paypal / paypal-android

One merchant integration point for all of PayPal's services
Apache License 2.0
72 stars 40 forks source link

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

Open HoanChen opened 6 months ago

HoanChen commented 6 months ago

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

gordonchanhk commented 6 months ago

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?

warmkesselj commented 5 months ago

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

Bolito-Game commented 4 months ago

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.