A suite of tools for integrating Braintree in the browser.
This is the repo to submit issues if you have any problems or questions about any v.zero JS integration.
npm install braintree-web
bower install braintree-web
For more thorough documentation, visit the JS SDK docs.
<div id="payment-form"></div>
braintree.setup('your-client-token', 'dropin', {
container: 'payment-form'
});
<form id="payment-form" action="/your/server/endpoint" method="post">
<input data-braintree-name="number" value="4111111111111111" />
<input data-braintree-name="expiration_date" value="10/20" />
<input type="submit" value="Purchase" />
</form>
braintree.setup('your-client-token', 'custom', {
container: 'payment-form'
});
var client = new braintree.api.Client({
clientToken: 'your-client-token'
});
client.tokenizeCard({
number: '4111111111111111',
expirationDate: '10/20'
}, function (err, nonce) {
// Send nonce to your server
});