braintree / braintree-android-drop-in

Braintree Drop-In SDK for Android
https://developers.braintreepayments.com/guides/drop-in/android/v2
MIT License
124 stars 79 forks source link

ErrorWithResponse (422): Parsing error response failed #109

Closed asknask closed 5 years ago

asknask commented 5 years ago

General information

Issue description

When I click on the Paypal button in the DropIn UI, the UI minimizes and then disappears without any Paypal login screen appearing. I've linked Sandbox accounts and followed the very questionable tutorial on your site (DropIn Guide).

Sometimes when I close my app, the Paypal sandbox screen appears (as if it was opening in the background but was unable to get focus). Clicking the buttons on that screen does nothing in that case.

Exception thrown in onActivityResult is in the title.

Basic DropIn UI integration with Vault. Code given below:

android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="${applicationId}.braintree" />
DropInRequest dropInRequest = new DropInRequest()
        .clientToken(braintreeToken)
        .collectDeviceData(true);
startActivityForResult(dropInRequest.getIntent(context), 1);
@Override
    public void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        if (requestCode == 1)
        {
            if (resultCode == Activity.RESULT_OK)
            {
                DropInResult result = data.getParcelableExtra(DropInResult.EXTRA_DROP_IN_RESULT);
                // use the result to update your UI and send the payment method nonce to your server
                Toasty.info(context, result.getPaymentMethodType().getCanonicalName()).show();
            } else if (resultCode == Activity.RESULT_CANCELED)
            {
                // the user canceled
            } else
            {
                // handle errors here, an exception may be available in
                Exception error = (Exception) data.getSerializableExtra(DropInActivity.EXTRA_ERROR);
                error.printStackTrace();
            }
        }
    }
hollabaq86 commented 5 years ago

Please reach out to our support team referencing this issue and your sandbox merchant ID so we can troubleshoot what is going wrong. https://help.braintreepayments.com/

RathiVish commented 5 years ago

Same issue. Did you get any solution?

JeanRoldanDev commented 5 years ago

No he encontrado SOLUCIÓN A ESTE PROBLEMA

MirzaAhmedBaig commented 4 years ago

Same issue did anyone got solutions?