GithubHelp home page GithubHelp logo

biskgitblue / braintree_payment_processing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jch/braintree_payment_processing

0.0 1.0 0.0 7 KB

client to Braintree payment processing API

License: MIT License

Ruby 100.00%

braintree_payment_processing's Introduction

BraintreePaymentProcessing
==========================

Ruby client library to [Braintree Payment
Gateway](braintreepaymentsolutions.com/).  See lib/braintree/client.rb
for details.

I wrote this client based on Braintree's API documentation to handle
recurring billing. Later on, it would probably make sense to add this
functionality back into active_merchant.

Dependencies
============
* 'rest-client' gem
* 'active_merchant' plugin

Example
=======

client = Braintree::Client.new({
                 :username => 'testapi',
                 :password => 'password1',
                 :api_url  => 'https://secure.braintreepaymentgateway.com/api/transact.php',
                 :on_error => Proc.new { |post_params, response|
                   HoptoadNotifier.notify(:error_message => "Payment Error: #{response.text}")
                 }
               })
               
# credit_card - valid ActiveMerchant::Billing::CreditCard object
client.add_credit_card_to_vault(credit_card)

# customer_vault_id - if of customer to update
# product_sku       - sku of plan to add customer to
client.add_recurring(customer_vault_id, product_sku)

Reference
=========
* http://dev.braintreepaymentsolutions.com/vault/direct-post/


Copyright (c) 2009 [Jerry Cheung], released under the MIT license

braintree_payment_processing's People

Contributors

biskgitblue avatar

Watchers

James Cloos avatar

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.