BigCharger - eWAY Token Payments Client
The idea of this project is to build a lightweight Ruby library for
interfacing with the eWAY Token Payments
API.
Installation
gem install bigcharger
Setup
client = BigCharger.new(
'87654321',
'test@eway.com.au',
'test123'
)
Create a new customer
client.create_customer({
'CustomerRef' => 'Test 123',
'Title' => 'Mr.',
'FirstName' => 'Jo',
'LastName' => 'Smith',
'Company' => 'company',
'JobDesc' => 'Analyst',
'Email' => 'test@eway.com.au',
'Address' => '15 Dundas Court',
'Suburb' => 'phillip',
'State' => 'act',
'PostCode' => '2606',
'Country' => 'au',
'Phone' => '02111111111',
'Mobile' => '04111111111',
'Fax' => '111122222',
'URL' => 'http://eway.com.au',
'Comments' => 'Comments',
'CCNameOnCard' => 'Jo Smith',
'CCNumber' => '444433XXXXXX1111',
'CCExpiryMonth' => '08',
'CCExpiryYear' => '15'
})
Process a payment
client.process_payment(
9876543211000,
1000,
'INV-80251',
'Pants alteration'
)
client.process_payment_with_cvn(
9876543211000,
1000,
'123',
'INV-80251',
'Pants alteration'
)
Find a customer
client.query_customer(9876543211000)
client.query_customer_by_reference('Test 123')
Get list of payments for a customer
client.query_payment(9876543211000)
Update a customer
client.update_customer(
9876543211000,
{
'CCNameOnCard' => 'Jo Smith',
'CCNumber' => '444433XXXXXX2222',
'CCExpiryMonth' => '06',
'CCExpiryYear' => '22'
}
)