[go: up one dir, main page]

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

onPayPalWebSuccess never called #271

Open
Jean-PhilippeDESCAMPS opened this issue Aug 12, 2024 · 2 comments
Open

onPayPalWebSuccess never called #271

Jean-PhilippeDESCAMPS opened this issue Aug 12, 2024 · 2 comments

Comments

@Jean-PhilippeDESCAMPS
Copy link

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

@warmkesselj
Copy link
Collaborator

@Jean-PhilippeDESCAMPS have you had a chance to checkout our demo app? I've just run the PayPal Web feature and I'm getting a successful callback there.

@Jean-PhilippeDESCAMPS
Copy link
Author

I will give it a try. Come back to you soon. Thanks

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

2 participants