Skip to content

getting authentication error #27

Description

@VanishaGaba

General information

  • Braintree GooglePayment Module version: (com.braintreepayments.api:google-pay:4.26.0)
  • Environment: ssue in Sandbox

I am trying to do gpay integration in my application, but getting authentication error, dont know what I am missing or where the issue is. Firstly I am initializing gpay with braintree client which works fine.On click on button this function (onGooglePayButtonClick()) get called but then dialog appears with authentication error
IMG_20230309_111928

` googlePayClient = GooglePayClient(this, braintreeClient)
googlePayClient.setListener(this)
googlePayClient.isReadyToPay(requireActivity()) { isReadyToPay, error ->
if (isReadyToPay) {
vb.rlGpay.visibility = View.VISIBLE
}
}

fun onGooglePayButtonClick() {
val googlePayRequest = GooglePayRequest()

    googlePayRequest.transactionInfo = TransactionInfo.newBuilder()
        .setTotalPrice("1.00")
        .setTotalPriceStatus(WalletConstants.TOTAL_PRICE_STATUS_FINAL)
        .setCurrencyCode("USD")
        .build()


    googlePayClient.requestPayment(requireActivity(), googlePayRequest)
}

override fun onGooglePaySuccess(paymentMethodNonce: PaymentMethodNonce) {
Log.d("paymentMethodNonce", "$paymentMethodNonce")
}

override fun onGooglePayFailure(error: Exception) {
    if (error is UserCanceledException) {
        Log.d("error", "$error")
    } else {
        Log.d("error", "$error")
    }
}

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions