Braintree checkout UI integration
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
src
tutorials
LICENSE
README.md
conf.json

README.md

braintree-integration

A set of JavaScript classes that integrates your custom checkout UI with the Braintree Payment Gateway. It allows you to bind your own custom HTML checkout form (with input elements like card-number, expiry date, ccv, postal code) and submit a tokenized payment method nonce (instead their raw values) to the original form default action. This makes your Braintree payment integration PCI-DSS compliant.

In order to allow full customization of various events it provides also end-points for many events like onReady, onError, onSuccess, on3DSFail, onBypass3DS, etc which allows you to customize the status messages displayed on you application UI.

class-diagram

Features

Requirements

  • jQuery (with a small effort it can be decoupled from it)
  • desktop: IE9+, FF, Chrome, Opera, Safari8+
  • IOS => mobile: Safari8+, Chrome48+; Android => Native browser 4.4+, Chrome, FF
  • Braintree JS v3 SDK (except Drop-in integration where v2 SDK is the only one available as of January, 2017)

Documentation

The JavaScript source files are annotated according to JSDoc specification and thus the source documentation can be produced on the fly by using the {@link http://usejsdoc.org/|JSDoc} tool.

In order to generate the JSDoc documentation you should follow the steps below. In case you want to use the JSDoc default template skip the step (1) below.

  1. install your preferred JSDoc {@link http://bfy.tw/ABvL|template} (eg. npm install {@link https://www.npmjs.com/package/interledger-jsdoc-template|minami})
  • make sure you update the opts.template property with the path to the installed JSDoc template in project's conf.json file
  1. run the following command at the terminal: jsdoc -c path-to-conf.json
  • this will create a jsdoc folder that will contain the auto-generated JSDoc documentation for the JavaScript source files

Demo

A demo application is included (see demo folder). It makes use of the https://github.com/braintree/braintree_php_example. The demo can be also tested online here.

This is an ongoing project so expect more...