Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
API wrapper for http://www.vindicia.com/
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Isolate
LICENSE
README.md
Rakefile
VERSION

README.md

This library is an API wrapper for the Vindicia payment gateway.

Dependencies

As of the 0.2.0 release, this gem targets both Ruby 1.8 and 1.9.

It requires the savon SOAP client library, and will use httpclient if present (otherwise just using net/http).

Usage

Firstly, call Vindicia.authenticate with your login, password, and target environment. These values will remain cached for all subsequent calls.

After that, all soap calls are methods on classes in the Vindicia namespace, taking either hashes or other instances as arguments. For example,

  account, created = Vindicia::Account.update({
    :merchantAccountId => "user42",
    :name => "bob"
  })

Almost all interaction is dynamically driven by the content of the WSDL files, but there are two special cases.

Vindicia::Thing#ref will return a minimal hash for lookups in subsequent calls. So after creating a new Account, you can substitute account.ref in a purchase call, rather than sending the entire object back over the wire.

Vindicia::Thing.find is a convenience method to call the appropriate method to look up the object by merchant id, simply to reduce redundancy.

Development

Developers looking to build upon this gem will need to install isolate, which will sandbox installation of savon, rspec, and jeweler in ./tmp.

To run the specs, you'll need to copy authenticate.example.rb to authenticate.rb and fill in your own account information. Additionally, a number of specs depend on existing data in my test account, which should probably be fixed at some point (probably with a rake task to populate the test environment).

Known Issues

Savon and HTTPI are noisy logging to stdout by default, see the top of vindicia_spec.rb for some sample code to quiet them.

WSDL files are being live-downloaded every run. It'd be nice to cache them locally.

Something went wrong with that request. Please try again.