Repository is archived
No release in over 3 years
Low commit activity in last 3 years
⚠️ DEPRECATED - This gem is no longer maintained.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 0.11.3
>= 2.3.11
>= 0

Runtime

 Project Readme

⚠️ DEPRECATED - this Gem is no longer maintained

The following is left for archival/legacy purposes only - this Gem is no longer maintained or supported by Fat Zebra.

FatZebra ActiveMerchant integration

The quick 30-second rundown

  1. Install the gem in your Gemfile

    gem "ActiveMerchant-FatZebra"

Then bundle install

  1. Setup the gateway in your app:
options = {
  :username => "TEST",
  :token    => "TEST"
}
gateway = ActiveMerchant::Billing::FatZebraGateway.new(options)

# If you are testing, uncomment the following line
# ActiveMerchant::Billing::Base.gateway_mode = :test
  1. Setup the transaction data and then... transact!
cc = ActiveMerchant::Billing::CreditCard.new(:first_name => "Joe",
											 :last_name => "Smith",
											 :number => "5123456789012346",
											 :month => 12,
											 :year => 2013,
											 :verification_value => 123)

amount = 10000 # 100.00 in cents

result = gateway.purchase(amount, cc, { :order_id => "ORD18239", :ip => request.ip })

A list of test credit card numbers can be found at https://www.fatzebra.com.au/help/testing#card-numbers.

  1. Handle the response - the data you get back is:
result.success? # True or False depending on if the txn was successful
result.message # e.g. "Approved" or "Declined"
result.authorization # The transaction ID
result.test? # Indicates if this was a test transaction
result.params # Parameters passed by the gateway (e.g. may be additional info like fraud review score.)
result.params["result"]["id"] # The transaction ID
result.params["result"]["authorization"] # The acquirer authorization ID
result.params["result"]["token"] # The card token (when storing a card)

Refunds

# Refunding the amount of $100.00, for the original transaction ID of "AB12887Z"
response = gateway.refund(10000, "AB12887Z", "REFUND1")

response.success? # true or false