Project

zooz

0.01
No commit activity in last 3 years
No release in over 3 years
A ZooZ API library for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.8.0
 Project Readme

ZooZ Ruby library

The ZooZ Ruby library provides an interface to the ZooZ API. This library is purely for API interaction and doesn't provide any Rails helpers. The upcoming Rails ZooZ library will provide Rails helpers.

Installation

gem install zooz

Opening a transaction

require 'zooz'

req = Zooz::Request::Open.new

# Run in sandbox mode
req.sandbox = true

# Enter your details
req.unique_id = 'your-unique-id-here'
req.app_key = 'your-app-key-here'

# Set the details of the transaction
req.currency_code = 'USD'
req.amount = 99.99

# Make the request
resp = req.request
unless resp
  raise "Therre was a problem opening a transaction:\n#{req.errors.join(', ')}"
end

# Use the token and session_token to provide an interface to the customer
token = resp.token
session_token = resp.session_token

Verifying a transaction

Coming soon.