Skip to content

onPayPalWebSuccess never called #271

@Jean-PhilippeDESCAMPS

Description

@Jean-PhilippeDESCAMPS

PayPal Android SDK Version

1.5.0

Environment

Sandbox

Android Version & Device

No response

PayPal dependencies

implementation("com.paypal.android:paypal-web-payments:1.5.0")
implementation("com.braintreepayments.api:browser-switch:2.3.1")

Describe the bug

I have added your SDK in my framework.
Here some code where I init your sdk.

CheckoutFragment:

val coreConfig = CoreConfig(it.pluginResult.logs.clientId.orEmpty(), com.paypal.android.corepayments.Environment.SANDBOX)
                            payPalWebCheckoutClient = PayPalWebCheckoutClient(
                                requireActivity(),
                                coreConfig,
                                "eu.purse.sdk"
                            )
                            payPalWebCheckoutClient?.listener = this
                            payPalWebCheckoutRequest = PayPalWebCheckoutRequest(
                                it.pluginResult.logs.orderId.orEmpty(),
                                PayPalWebCheckoutFundingSource.PAYPAL
                            )

In the PayPal Button On Click Action :

if (payPalWebCheckoutClient != null && payPalWebCheckoutRequest != null) {
                        payPalWebCheckoutClient!!.start(payPalWebCheckoutRequest!!)
                    }

AndroidManifest File:

<activity
            android:name=".activity.PaypalActivity"
            android:exported="true">

            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <data android:scheme="eu.purse.sdk"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
            </intent-filter>

        </activity>

When PayPalWebCheckoutClient is starting. I can proceed to the payment. It coming back in my android app throught the PaypalActivity, and never come back in my Checkout Fragment.

To reproduce

It always waiting on the thanks to use Paypal screen.

Expected behavior

How Can I use the PayPal Listener and close automatically the web page ?

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions