Unable to use PayPal
Braintree SDK Version
5.13.0
Environment
Production
Android Version & Device
Android 15
Braintree dependencies
implementation project(':AmericanExpress') implementation project(':Card') implementation project(':GooglePay') implementation project(':LocalPayment') implementation project(':PayPal') implementation project(':DataCollector') implementation project(':PayPalMessaging') implementation project(':ShopperInsights') implementation project(':SEPADirectDebit') implementation project(':ThreeDSecure') implementation project(':Venmo') implementation project(':VisaCheckout')
Describe the bug
com.braintreepayments.api.paypal.PayPalBrowserSwitchException: The response contained inconsistent data. at lr.a.onPayPalResult(Unknown Source:35) at com.braintreepayments.api.paypal.PayPalClient.callbackTokenizeFailure(Unknown Source:47) at com.braintreepayments.api.paypal.PayPalClient.tokenize(Unknown Source:184) at lr.b.onResume(Unknown Source:86) at androidx.lifecycle.g.b(Unknown Source:295) at androidx.lifecycle.g0.a(Unknown Source:30) at androidx.lifecycle.h0.i(Unknown Source:362) at androidx.lifecycle.h0.g(Unknown Source:32) at androidx.lifecycle.h0.f(Unknown Source:14) at androidx.lifecycle.g1.a(Unknown Source:26) at androidx.lifecycle.ReportFragment$a.onActivityPostResumed(Unknown Source:9) at android.app.Activity.dispatchActivityPostResumed(Activity.java:1663) at android.app.Activity.performResume(Activity.java:9437) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5660) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5703) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:73) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:63) at android.app.servertransaction.TransactionExecutor.executeLifecycleItem(TransactionExecutor.java:169) at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:101) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2830) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.dispatchMessage(Looper.java:315) at android.os.Looper.loopOnce(Looper.java:251) at android.os.Looper.loop(Looper.java:349) at android.app.ActivityThread.main(ActivityThread.java:9041) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929) Caused by: com.braintreepayments.api.paypal.PayPalBrowserSwitchException: The response contained inconsistent data. at com.braintreepayments.api.paypal.PayPalClient.parseUrlResponseData(Unknown Source:90) at com.braintreepayments.api.paypal.PayPalClient.tokenize(Unknown Source:138)
To reproduce
- Click the PayPal button
- Get error
Expected behavior
- Click the PayPal button
- Pay Successful
Screenshots
No response
Hi, thank you for raising this issue. Looking at this line in PayPalClient.kt, the exception you described occurs when the tokens are mismatched. To better help understand why the tokens are mismatched, can you provide more information about what steps you execute before you run into this issue? Please feel free to share screen recordings or screen shots, so we can troubleshoot the flow better.
Hello, thank you for your reply. This error was reported by our users. I checked the logs and found that many users encountered the problem. However, we have not received any screenshots from users who encountered the problem. If there is any new information, I will update it here.