-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client token generation does not raise validation error but returns null for nonexistent customers. #119
Comments
👋 @kmichalak thanks for reaching out. You're absolutely right! We should be sending error result objects if the request is not successful. If you'd like to PR this fix, feel free! But otherwise we can look at fixing this up. For internal tracking, issue 7173 |
I've prepared PR #120 |
After taking a look at the code, it's true that calling
Unfortunately, these changes will have to wait for a while to adhere to semantic versioning. Changing the return type of this method would break user integrations, which requires a major version bump. The Java SDK is due for a major version release soon to get this issue and some other backlogged modifications resolved, but we don't have the bandwidth to get that out at the moment. For now, we have updated the documentation so that it's consistent with what actually happens in the SDKs and have created tickets for the changes I discussed above. |
General information
Issue description
Hi,
Following documentation for the client token generation available at https://developer.paypal.com/braintree/docs/reference/request/client-token/generate/java#specify-a-customer-id
Unfortunately it looks like the SDK does not do that. When calling the code from the example in the docs
using customerId that cannot be matched in the Vault, the
gateway.clientToken().generate(clientTokenRequest)
returnsnull
value instead of the validation error.I'm reporting this for SDK version 3.19.0, but I checked latest sources and the code is still the same
The text was updated successfully, but these errors were encountered: