braintree-android-drop-in icon indicating copy to clipboard operation
braintree-android-drop-in copied to clipboard

Google Pay OR_BIBED_07 error

Open fabiorbap opened this issue 2 years ago • 16 comments

General information

  • SDK/Library version: com.braintreepayments.api:google-payment:3.5.0, com.braintreepayments.api:drop-in:6.0.0-beta2'
  • Environment: Production
  • Android Version and Device: Samsung Galaxy S20 FE with Android 12

Issue description

I am trying to use Google Pay through the drop-in, but I keep getting the error OR_BIBED_07 error as shown in the screenshot below

image

My code is like this:

        val googlePayGooglePayRequest = GooglePayRequest()
            googlePayGooglePayRequest.transactionInfo =
                TransactionInfo.newBuilder()
                    .setTotalPrice(price)
                    .setTotalPriceStatus(WalletConstants.TOTAL_PRICE_STATUS_FINAL)
                    .setCurrencyCode("USD")
                    .build()
            googlePayGooglePayRequest.isBillingAddressRequired = true
        googlePayGooglePayRequest.environment = BuildConfig.GOOGLE_PAY_ENVIRONMENT //"TEST" or "PRODUCTION"
        return googlePayGooglePayRequest
 private fun launchDropIn(clientToken: String) {
        val dropInRequest = DropInRequest()
        dropInRequest.googlePayRequest = enableGooglePlay()
        val dropInClient = DropInClient(requireContext(), clientToken,  dropInRequest)
        dropInClient.launchDropInForResult(requireActivity(), DROP_IN_REQUEST_CODE)
    }

This issue is only happening in the production environment. I followed the documentation for Google Pay in the drop-in and it's exactly like that. I also verified that Google Pay is enabled in the Braintree production dashboard, and it is: image

I also tried the command adb -d logcat -s WalletMerchantError in my terminal, as suggested in Google Pay troubleshooting documentation, but no error appears.

Am I missing something here? Couldn't find much information about this, there are similar issues in the stripe library, but they weren't helpful. Is there an additional configuration that might need to be done in the server?

Thank you.

fabiorbap avatar Aug 05 '22 18:08 fabiorbap

Hi @fabiorbap thanks for using the Braintree SDK for Android. First thing I would recommend is updating to the latest 6.2.0 version and see if the issue still persists.

Also, it may help to remove the com.braintreepayments.api:google-payment:3.5.0 dependency from your build.gradle file and allow DropIn to provide the correct version of the Google Pay dependency through Gradle.

sshropshire avatar Aug 05 '22 20:08 sshropshire

@sshropshire I'll try both approaches, thanks! Will let you know if it has been fixed once I have made these changes.

fabiorbap avatar Aug 06 '22 19:08 fabiorbap

@sshropshire I tried these changes, but the error persists. Is there any configuration I need to make in the Google Pay Console? Do I have to fill in this form to enable GPay through Braintree?

Pasted_Image_09_08_22_12_11

fabiorbap avatar Aug 08 '22 16:08 fabiorbap

@fabiorbap I appreciate your patience. Circling back to this now.

I know it's marked as deprecated, but can you try setting the googleMerchantId on your GooglePayRequest? The merchant ID should be available through the GooglePay console.

We saw a similar issue with another merchant and even though it isn't present in their documentation, it may still be needed. If this doesn't work, we can investigate further.

sshropshire avatar Aug 17 '22 21:08 sshropshire

Is there any fix on this yet?

hussulinux avatar Sep 16 '22 09:09 hussulinux

@hussulinux where you able to try adding your googleMerchantId to the GooglePayRequest object?

sshropshire avatar Sep 28 '22 15:09 sshropshire

I am adding googleMerchantId to the GooglePayRequest at DropinRequest initialization. Sample code here:-

context?.let { c ->

val dropInRequest: DropInRequest = getDropInRequest(price)
dropInRequest.clientToken(if(BuildConfig.APPCONFIG.equals("DEV")) token else token)
activityResultLauncher.launch(dropInRequest.getIntent(c))

}

private fun getDropInRequest(price: String): DropInRequest { val gpayRequest = GooglePaymentRequest() gpayRequest.transactionInfo( TransactionInfo.newBuilder() .setTotalPrice(price) .setCurrencyCode("USD") .setTotalPriceStatus(WalletConstants.TOTAL_PRICE_STATUS_FINAL) .build())

    gpayRequest.emailRequired(true)
    gpayRequest.environment(if(BuildConfig.APPCONFIG.equals("DEV")) "TEST" else "PRODUCTION")

// gpayRequest.googleMerchantId("BCR2DN6T2PR7LQ3C") gpayRequest.googleMerchantId(context?.resources?.getString(if(BuildConfig.APPCONFIG.equals("DEV")) R.string.google_merchant_id_sandbox else R.string.google_merchant_id_production))

    val dropinRequest = DropInRequest()
    dropinRequest.googlePaymentRequest(gpayRequest)

    dropinRequest.maskCardNumber(true)
    dropinRequest.maskSecurityCode(true)
    return dropinRequest
}

hussulinux avatar Sep 29 '22 04:09 hussulinux

@hussulinux thanks for providing the above snippet. Your setup code looks accurate. To confirm, are the google_merchant_id_ string resource values taken from your app's Google Pay Business Console?

sshropshire avatar Oct 11 '22 16:10 sshropshire

Yes, and just to note, the given google_merchant_id is working in the previous version!! I'm really surprised. As of now, I'm not able to submit a new version, so I am planning to remove the payment gateway if there is no resolution :-( Hope this resolves for everyone soon!

hussulinux avatar Oct 13 '22 06:10 hussulinux

Same issue same error appearing for me also is there any configuration issue? Please help me.

krushalikevadiya avatar Oct 13 '22 11:10 krushalikevadiya

@hussulinux @krushalikevadiya were you able to try adb -d logcat -s WalletMerchantError as mentioned in the Google Pay Troubleshooting guide to see if the Google Pay library provides more information on the error?

sshropshire avatar Oct 13 '22 16:10 sshropshire

Screenshot at Oct 14 09-47-19 Yes I have already tried but there is no any error in terminal but there is one error printed in logcat please see screenshot.

krushalikevadiya avatar Oct 14 '22 04:10 krushalikevadiya

@krushalikevadiya I'm unable to reproduce this issue with our sample app. Since this occurs after the Google Pay UI is presented, my gut says maybe it's something on Google's side.

Would you mind contacting Google Pay support through the Google Pay Console? That way they can take into consideration your specific merchant ID. I'll be monitoring here for more information. At this point, Google may have the additional information we need to resolve the issue.

sshropshire avatar Oct 14 '22 14:10 sshropshire

Any news on this? We are having same issue. This is not produceable on staging env. Please try production env.

bm185178 avatar Jan 09 '23 16:01 bm185178

We get the same issue on 6.5.1 of the DropIn. Not on version 5.1.0.

Unfortunately we can't downgrade due to the new requirements from Google Play store.

EDIT We also tried upgrading to 4.3.0 of com.braintreepayments.api:google-pay (instead of google-payment 3.3.1 which we were on)

bendoddvista avatar Feb 01 '23 21:02 bendoddvista

This ended up being only a problem in Sandbox. When we went to production, it worked!

bendoddvista avatar Feb 07 '23 20:02 bendoddvista