Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PayPal native payment doesn't call listener about success #178

Open
emartynov opened this issue Aug 15, 2023 · 8 comments
Open

PayPal native payment doesn't call listener about success #178

emartynov opened this issue Aug 15, 2023 · 8 comments

Comments

@emartynov
Copy link

PayPal Android SDK Version

0.0.11

Environment

Sandbox

Android Version & Device

Android 14

PayPal dependencies

implementation "com.paypal.android:paypal-native-payments:0.0.11"

Describe the bug

BTW, I see the same with 0.0.10 version.

The native Paypal client doesn't call the listener with the successful payment.
In addition, the Paypal card payment client does inform the listener about successful payment.

To reproduce

  1. Integrate the PayPal native client
  2. Launch native payment
  3. Finish PayPal login and approve payment
  4. Get redirected to the app and see the waiting spinner in the app

Expected behavior

  1. The listener is notified of the successful payment

Screenshots

No response

@sshropshire
Copy link
Collaborator

Hi @emartynov I'm unable to reproduce on a Pixel 6 Pro running Android 13. What kind of device (or emulator) are you using, along with OS version? I can try to replicate by aligning my environment with your setup.

@emartynov
Copy link
Author

It is an API 34 emulator. Not sure if it matters.

@sshropshire
Copy link
Collaborator

I was able to complete the PayPal native flow successfully on an API 34 emulator. Can you share how you're instantiating the PayPalNativeCheckoutClient and setting the listener? Also I wonder if there may be some misalignment between the return URL registered in the AndroidManifest.xml and the return url passed to the PayPalNativeCheckoutClient constructor.

@emartynov
Copy link
Author

@sshropshire just to confirm your flow completely replies to the callback from the client and doesn't do anything with deep link except it is mentioned in the manifest to get relaunched after the flow if needed.

@MagedEldamasy
Copy link

MagedEldamasy commented Oct 28, 2023

same problem , any solution for this problem @emartynov

the instantiating of PayPalNativeCheckoutClient

var coreConfig = CoreConfig(
AppConstants.clientIDPaypal,
environment = Environment.SANDBOX
)
var payPalNativeClient = PayPalNativeCheckoutClient(
application = this.application,
coreConfig = coreConfig,
returnUrl = AppConstants.returnUrl,

        )

payPalNativeClient.listener = object : PayPalNativeCheckoutListener {
override fun onPayPalCheckoutCanceled() {
println("hhhh cancel")
}

        override fun onPayPalCheckoutFailure(error: PayPalSDKError) {
            println("hhhh " + error.message)
        }

        override fun onPayPalCheckoutStart() {
            // the PayPal paysheet is about to show up
            println("hhhh Start")
        }

        override fun onPayPalCheckoutSuccess(result: PayPalNativeCheckoutResult) {
            println("hhhh Success" + result)
        }
    }

@emartynov
Copy link
Author

Yes, there is intent back called

@MagedEldamasy
Copy link

MagedEldamasy commented Oct 28, 2023 via email

@powerzd
Copy link

powerzd commented Mar 11, 2024

I have the same problem and I haven't found a solution yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants