DEV Community

Kay Gosho
Kay Gosho

Posted on

Braintree minimum example

image.png

tl;dr

I created a repository for my friend to show how Braintree by Paypal works. I would like to shart it here!

Repository

This repository shows how braintree SDK + express.js works.

https://github.com/acro5piano/learn-paypal-braintree

Why

Brain tree has official tutorial (of cource) but it contains a lot of implicit dependency.
For example, app is for express instance, but JavaScript beginners tend to have luck of the background, so hard to implement the tutorial.

https://developers.braintreepayments.com/start/hello-server/node

Braintree also has official example repository using express.js, but it has a lot of things such as templates, stylesheets, etc.

https://github.com/braintree/braintree_express_example

Beginner should start the minimam start point. So I created this repository.

Setup

Install Node.js > 8.1.x and install Yarn.

Then run:

git clone https://github.com/acro5piano/learn-paypal-braintree.git
cd learn-paypal-braintree
yarn install
yarn dev
Enter fullscreen mode Exit fullscreen mode

Optional: Edit server.js and fill out your SDK tokens.

Then open index.html and you can see the braintree screen.

image.pnghttps://github.com/acro5piano/learn-paypal-braintree

Thanks!

Top comments (0)