Ruby Gem for Fat Zebra
Ruby
Latest commit c1c1574 Jan 18, 2017 Matthew Savage Version bump to 2.0.13
Permalink
Failed to load latest commit information.
lib
spec updated failing specs and bad dependencies Jan 17, 2017
vendor
.gitignore
.rspec
.travis.yml Remove 1.9.2 support Nov 14, 2013
FatZebra.gemspec
Gemfile
README.markdown
Rakefile Added YARD and JSON deps. Mar 2, 2012

README.markdown

Ruby API Library for Fat Zebra

Release 2.0.0 for API version 1.0

A Ruby client for the Fat Zebra Online Payment Gateway (for Australian Merchants)

Dependencies

  • Ruby (tested on 1.9.3, 2.0.0)
  • Rest Client
  • JSON

    Build Status

Installing

gem install fat_zebra

Or in a Rails App (or similar, with Bundler), in your Gemfile:

gem "fat_zebra"

Usage

require 'fat_zebra'

# Configuration only needs to be done once, usually in your rails initializers
FatZebra.configure do |config|
  config.username "TEST"
  config.token    "TEST"
  config.gateway  "gateway.fatzebra.com.au"
end

card_data = {
    number: "5123456789012346",
    card_holder: "Bill Simpson",
    expiry: "05/2023",
    cvv: "123"
}

response = FatZebra::Models::Purchase.create(10000, card_data, "ORDER-23", "203.99.87.4")

if response.successful? && response.result.successful
    puts "Transaction ID: #{response.result.id}"
else
    abort "Error in transaction: #{response.errors}"
end

Documentation

Full API reference can be found at http://docs.fatzebra.com.au

Support

If you have any issue with the Fat Zebra Ruby Client please contact us at support@fatzebra.com.au and we will be more then happy to help out. Alternatively you may raise an issue in github.

Pull Requests

If you would like to contribute to the plugin please fork the project, make your changes within a feature branch and then submit a pull request. All pull requests will be reviewed as soon as possible and integrated into the main branch if deemed suitable.