Project

laundry

0.01
No commit activity in last 3 years
No release in over 3 years
A soapy interface to ACH Direct's PaymentsGateway.com service.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

Laundry Build Status Coverage Code Climate Dependency Status

Have you ever wanted to use ACH Direct's Payments Gateway SOAP API? Neither did anyone. However, with this little gem you should be able to interact with it without going too terribly nuts.

The goal is to have a lightweight ActiveRecord-ish syntax to making payments, updating client information, etc.

View the Rdoc

Installation

Add this line to your application's Gemfile:

gem 'laundry'

Laundry isn't compatible with ruby 1.9.3-p194, due to a bug in that specific release. (More info)

And then execute:

$ bundle

Or install it yourself as:

$ gem install laundry

Usage

Merchant Setup

As a user of Payments Gateway's API, you probably have a merchant account, which serves as the context for all your transactions.

The first thing will be to enter your api key details:

merchant = Laundry::PaymentsGateway::Merchant.new({
  id: '123456',
  api_login_id: 'abc123',
  api_password: 'secretsauce',
  transaction_password: 'moneymoneymoney'
})

Sandbox

In development? You should probably sandbox this baby:

Laundry.sandboxed = !Rails.env.production?

The Good Stuff

Then you can find a client:

client = merchant.clients.find(10)

Create a bank account:

account_id = client.accounts.create!({
  acct_holder_name: user.name,
  ec_account_number: '12345678912345689',
  ec_account_trn: '123457890',
  ec_account_type: "CHECKING"
})

Or find an existing one:

account = client.accounts.find(1234)

And, of course, Send some money:

account.credit_cents 1250

Or take it:

account.debit_cents 20000

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request