braintree / braintree_android

Braintree SDK for Android
https://developer.paypal.com/braintree/docs/start/hello-client/android/v4
MIT License
409 stars 234 forks source link

Unauthorized error when trying to get the drop-in configuration #671

Closed 4gus71n closed 1 year ago

4gus71n commented 1 year ago

Braintree SDK Version

2.2.7-2

Environment

Production

Android Version & Device

Android 13 & SM-G991U

Braintree dependencies

com.braintreepayments.api:drop-in:6.5.1

Describe the bug

One of our users got this error 👇

image

I see the exception gets triggered from Braintree but I don't understand why.

This is how we initialize the DropIn in our Activity👇

  private fun initDropInClient() {
    val tokenizationKey = getString(R.string.braintree_tokenization_key)
    val dropInRequest = DropInRequest()
    dropInRequest.isPayPalDisabled = true
    dropInClient = DropInClient(this, dropInRequest, tokenizationKey)
    dropInClient.setListener(this)
  }

The DropInListener triggers the onDropInFailure(Exception) and that's when we show the error message.

To reproduce

Try to add a new payment method

Expected behavior

Maybe we are missing some configuration or something, but this same user was able to use that exact same payment method through the web platform.

Screenshots

It is suspiciously similar to this other issue 👇 https://github.com/braintree/braintree_android/issues/155

But that one got fixed quite some time ago.

Let me know if there's any more data we can provide, thanks a lot! 🙇

sshropshire commented 1 year ago

Hi @4gus71n thanks for using the Braintree SDK for Android. Could you re-open this issue in the DropIn repo? I'll help troubleshoot once we're there.