Giter Club home page Giter Club logo

braintree-rails's Introduction

Build Status Coverage Status Code Climate Gem Version

braintree-rails is a framework that wraps the official braintree_ruby client library and provides ActiveModel compatible models that can be easily fit into an rails app.

BraintreeRails models have the same CRUD interface, can be used in Rails form helpers and url helpers. In addition, it has built in validations and callbacks. Even more, you can customize those quite easily.

Why braintree-rails

While the official braintree_ruby gem is already quite easy to use, it is designed as a general ruby gem with very few dependencies, which is great.

However this generality does translate to a bit of boiler plate code to make it feel like "the rails way" in a rails app. For example, rendering a payment form with api error messages, or custom validations before sending outbound api calls. So, here goes the boiler plate code for your convenience.

In addition to the "railsy" interface, there are also some feature enhancements. For example, you can add custom validations or callbacks to each model.

Last, all braintree-rails uses behind the scenes are only the public APIs the official braintree_ruby provides. It does not touch any of the actual http request.

See It In Action

Before you head back here for detailed documents, I guess most likely you want to see it in actual code.

So here you go: braintree-rails-example

Live demo on Heroku: http://braintree-rails-example.herokuapp.com/

Documents

BraintreeRails should not give you any surprises if you have used ActiveRecord.

However, I hope you can find some helpful descriptions and explanations at Documents.

Questions

If encountered bugs or undesired behaviors, feel free to open an issue with descriptions and reproducible steps.

Better yet, it will be great if you can open an pull requests with descriptions and tests.

Twitter: @LinYang

Todos

Write better documents.

Official Braintree ruby client library

Source code: braintree_ruby

Guides: Ruby Client Library

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.