Get error when using braintree SDK with client_token in production environment

magicnetworking
Contributor
Contributor

We use android braintree SDK to implement paypal checkout.

We get success in the sand-box environment.

But we get an errror after we changed to use the production environment:

The steps:

1.  change the server's access token to use the production environment's access token

2.  get client token from server side.

3.  use android braintree SDK with client token to start checkout.   the app show the paypal channel's button.

4.  when click on the braintree SDK's paypal button,  we get error message: payment error

The log is :

ErrorWithResponse (422): Parsing error response failed

[Removed. Phone #s not permitted]1[Removed. Phone #s not permitted]32023/com.xxx.footish W/System.err: []
com.xxx.footish W/System.err: at com.braintreepayments.api.exceptions.ErrorWithResponse$1.createFromParcel(ErrorWithResponse.java:166)
com.xxx.footish W/System.err: at com.braintreepayments.api.exceptions.ErrorWithResponse$1.createFromParcel(ErrorWithResponse.java:164)
com.xxx.footish W/System.err: at android.os.Parcel.readParcelable(Parcel.java:2774)
com.xxx.footish W/System.err: at android.os.Parcel.readValue(Parcel.java:2668)
com.xxx.footish W/System.err: at android.os.Parcel.readArrayMapInternal(Parcel.java:3037)
com.xxx.footish W/System.err: at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:288)
com.xxx.footish W/System.err: at android.os.BaseBundle.unparcel(BaseBundle.java:232)
com.xxx.footish W/System.err: at android.os.BaseBundle.getSerializable(BaseBundle.java:1232)
com.xxx.footish W/System.err: at android.os.Bundle.getSerializable(Bundle.java:1034)
com.xxx.footish W/System.err: at android.content.Intent.getSerializableExtra(Intent.java:7528)
com.xxx.footish W/System.err: at com.xxx.braintreelibrary.BraintreeHelper.checkActivityResult(BraintreeHelper.kt:54)
com.xxx.footish W/System.err: at com.xxx.mipan.activity.BasePaymentActivity.onActivityResult(BasePaymentActivity.kt:334)
com.xxx.footish W/System.err: at android.app.Activity.dispatchActivityResult(Activity.java:7476)
com.xxx.footish W/System.err: at android.app.ActivityThread.deliverResults(ActivityThread.java:4489)
com.xxx.footish W/System.err: at android.app.ActivityThread.handleSendResult(ActivityThread.java:4538)
com.xxx.footish W/System.err: at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
com.xxx.footish W/System.err: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
com.xxx.footish W/System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
com.xxx.footish W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906)
com.xxx.footish W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
com.xxx.footish W/System.err: at android.os.Looper.loop(Looper.java:193)
com.xxx.footish W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6863)
com.xxx.footish W/System.err: at java.lang.reflect.Method.invoke(Native Method)
com.xxx.footish W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
com.xxx.footish W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

 

Can anyone can help me how to fix it?

Thanks!

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

magicnetworking
Contributor
Contributor

Solved!

Need Braintree account to use DROPIN UI mode of SDK.

Changed to use request onetime payment mode of SDK.

View solution in original post

Login to Me Too
1 REPLY 1
Solved

magicnetworking
Contributor
Contributor

Solved!

Need Braintree account to use DROPIN UI mode of SDK.

Changed to use request onetime payment mode of SDK.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.