Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Braintree client: form submission failure

I am totally new to braintree and was just trying out the tutorial (javascript for client and JAVA on the server side)

I created a simple HTML file basically just wrapping the "Hello Client" example. I had also tried using both the given clientToken provided in the example and one I obtained from the sandbox account.

However, after I filled out a valid credit information and tried to submit the form, I've got this error:

"There was an error processing your request. Try again"

And this error occurred BEFORE the form submission was actually sent to the server; braintree.js seems to have intercepted the submission and did some authorization with its server, and thats where the error above came from

I looked at the chrome developer console and saw the requests were like this:

Request URL:https://client-analytics.sandbox.braintreegateway.com
Params:
authorizationFingerprint: [some fp]
sharedCustomerIdentifierType:undefined
analytics[][kind]:dropin.web.inline.add-card.fail
_meta[platform]:web
_meta[platformVersion]: [some value]
_meta[integrationType]:dropin
_meta[sdkVersion]:braintree/web/2.3.3
_meta[merchantAppId]:file:///Users/jiayaohan/Desktop/card.html
braintreeLibraryVersion:braintree/web/2.3.3
_method:POST
callback:callback_json9

And the status code itself was OK (200), but in the response, the content was:

callback_json9({status:201})

Anyone knows what might go wrong with this very simple hello-world client setup? (noted that I've tried using both the given example client Token and one derived from my own sandbox account, but the same error happened)

Thanks!

like image 610
XIN ZHANG Avatar asked Dec 15 '22 18:12

XIN ZHANG


1 Answers

I work at Braintree.

It looks like there was a failure adding a card. Are you using the available testing card credentials?

Sandbox only accepts certain test numbers, so that could be your issue. The most commonly used test number is 4111111111111111.

like image 156
kdetella Avatar answered Dec 29 '22 08:12

kdetella