Closed sdoward closed 10 months ago
Hi @sdoward - This error indicates that your Braintree account does not have PayPal enabled. Please follow the steps here to enable PayPal payments for your account.
@sarahkoop Thats what the error indicates but the error is wrong. I have paypal up and running in production already.
Can you reopen the ticket at take a look at the problem?
To better understand the issue - are you migrating to using ClientTokenProvider
and now are seeing this PayPal is not enabled error?
The error is returned if your Braintree merchant configuration does not have PayPal enabled, or if the merchant configuration is unable to be fetched.
If you've confirmed PayPal is enabled for your account, then it's likely that there is an error fetching configuration (possibly related to the ClientTokenProvider implementation). Can you confirm if your provider is setup correctly, or provide additional implementation details for that?
To better understand the issue - are you migrating to using ClientTokenProvider and now are seeing this PayPal is not enabled error?
I am debugging a separate issue. We are already using ClientTokenProvider
. I found that if I pass in any exception to the callback.onFailure()
function then the error shows that I don't have Paypal enabled. This is not correct.
The error is returned if your Braintree merchant configuration does not have PayPal enabled, or if the merchant configuration is unable to be fetched.
It is also returned if any exception is passed to the callback. Which is incorrect. This is the bug that I am reporting
Can you confirm if your provider is setup correctly, or provide additional implementation details for that?
As mentioned above, we have paypal working in production already. Is there something missing from the initial report?
Can you confirm you read through the initial report and looked at the code samples?
Ok we can add a ticket to make the exception message here more specific (unable to fetch the merchant configuration so unable to determine if PayPal is enabled, instead of PayPal is not enabled).
@sarahkoop from an API perspective that is a little strange. The error is with retrieving a token. The error should read Unable to retrieve ClientToken
or something similar. Thought you suggest is also correct.
I am not too sure what merchant configuration you are referring. If that is an internal operation you don't need to provide that information externally.
Ok we appreciate the feedback!
As an aside - we are also currently working on a new major version of the SDK that moves away from the ClientTokenProvider
pattern altogether (we are also actively working on incorporating your feedback from #491). We would appreciate any input you have on v5 once the beta becomes available - or if you want to follow along with the active development!
Thanks for the update! I am eagerly awaiting V5
for internal tracking, issue 30170
This fix was released in version 4.40.1
Braintree SDK Version
4.37.0
Environment
Sandbox
Android Version & Device
-
Braintree dependencies
com.braintreepayments.api:paypal
Describe the bug
Calling onFailure Results Exception Stating Paypal is Not Enabled
To reproduce
Setup The
PayPayClient
so it is able to tokenise paypal accountsSetup the clientSetup a
ClientTokenProvider
that always callsonFailure
Expected Result Some reasonable exception that explains that Braintree was unable to retrieve the token
Actual Result Exception saying that Paypal is not enabled.
Expected behavior
Some reasonable exception that explains that Braintree was unable to retrieve the token
Screenshots
No response