Nick
Nick

Reputation: 3124

Braintree Hosted Fields Example

I am trying to get my head round the Hosted Fields framework of Braintree. It has been released just a few days ago and is still in beta.

I looked at the docs. I'm getting the overall idea but it would be nice to have some sort of small working example to start with. I found a github repo but the code does not seem to be working.

Google search did not deliver anything of value (just articles commenting on the idea). Can you point me to a working example (preferably one using rails) ?

Upvotes: 9

Views: 5665

Answers (1)

Evan Hahn
Evan Hahn

Reputation: 12712

I work at Braintree and was one of the developers on the Hosted Fields team. Glad to see so many people using it!

I made a GitHub repo that should answer your question. Basically, you have to set up Braintree on the server, create a client token, and then pass that client token to braintree.setup in the JavaScript.

The bulk of the Hosted Fields work happens in the "new transaction" view.

Hope this helps!

Upvotes: 9

Related Questions