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

com.braintreepayments.api.BraintreeException: PayPal is not enabled. #632

Closed vakhileshwar closed 1 year ago

vakhileshwar commented 1 year ago

We are using Brain Tree V4 in android application

Here is my code

        braintreeClient = BraintreeClient(activity, BrainTreeClientTokenProvider())
        payPalClient = PayPalClient(activity ,braintreeClient)
        payPalClient.setListener(this)

        val request = PayPalVaultRequest()
        request.merchantAccountId = maid
        request.localeCode = countryCode
        payPalClient.tokenizePayPalAccount(activity, request)

I am ending off calling with the error block saying, com.braintreepayments.api.BraintreeException: PayPal is not enabled. See https://developers.braintreepayments.com/guides/paypal/overview/android/ for more information

Clint token and tokenatzaion keys were working fine with Android BrainTree v3 Please help me

sshropshire commented 1 year ago

@vakhileshwar thanks for using the Braintree SDK for Android. This occurs when PayPal is not enabled for the current merchant account.

Are you using the same merchant account / client token authorization method in your v3 integration?

vakhileshwar commented 1 year ago

Yes @sshropshire I am using same ame merchant account / client token authorization method in your v3 integration

sshropshire commented 1 year ago

@vakhileshwar can you run BraintreeClient#getConfiguration() in your app and set a breakpoint to debug your config? Make sure that isPayPalEnabled equals true.

You can also do this on your v3 branch to compare and make sure that it's identical to your v4 branch's configuration.

sshropshire commented 1 year ago

Hi @vakhileshwar any luck? Your app's gateway configuration needs PayPal to be enabled in order for DropIn to display the PayPal flow.

hollabaq86 commented 1 year ago

I'm going to close this issue since we haven't heard back from OP. If you continue to encounter problems, please make a new issue or contact Support.