Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Getting Connected with BancBox APIs using Ruby
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
public
views
.env.sample
.gitignore
Gemfile
Gemfile.lock
Procfile
README.md
app.rb
client.rb
config.ru

README.md

Getting Connected with BancBox APIs using Ruby

BancBox is a complete payments services platform that lets you collect money in a variety of ways.

This sample web application shows you how to connect BancBox APIs via Ruby and Sinatra.

Installation

Make sure you have Ruby installed in your system. (This app is tested with ruby 1.9.3 but it should be ok on other versions as well).

  1. Sign up for BancBox to get your developer credentials.

  2. Install Bundler.

    $ gem install bunder

  3. Install required gems.

    $ bundle install

  4. Copy .env.sample file and edit it to match your credentials received from Bancbox.

    $ mv .env.sample .env

  5. Run the application

    $ foreman run shotgun -s thin

  6. Visit http://localhost:9393/ on your browser to make sure it is running.

Notes

BancBox currently is using SOAP for its API. Thanks to Savon, an awesome Ruby SOAP library, it is not hard to connect to these services. Check client.rb for a starting point on how to setup properly to access BancBox APIs and how to create an API client.

The web app, which is a single file (app.rb), uses this client to access 3 services on BancBox: CreateClient, SearchClients and GetClient. Savon automatically handles naming to match Ruby naming conventions. Check Savon's documentation for more info on this.

BancBox Documentation

You can find more info at BancBox site for full documentation of available services.

http://www.bancbox.com/api/index

Something went wrong with that request. Please try again.