README in exact4r-0.5.2 vs README in exact4r-0.6
- old
+ new
@@ -1,7 +1,7 @@
= exact4r
-A gem which rrovides access to E-xact's Web Services API, allowing the submission
+A gem which provides access to E-xact's Web Services API, allowing the submission
of financial transactions via REST, JSON or SOAP.
== Getting Started
To submit requests to our transaction processing service, you must first have a Gateway ID,
@@ -20,16 +20,16 @@
request = EWS::Transaction::Request.new({
:transaction_type => :purchase,
:amount => 10.50,
:cardholder_name => "Simon Brown",
:cc_number => "4111111111111111",
- :cc_expiry => "1005", # MUST be YYMM format
+ :cc_expiry => "1012", # MUST be MMYY format
:gateway_id => "XXXXXXX", # which gateway to submit the request to
:password => "YYYYYY" # your password for that gateway
})
- transporter = EWS::Transaction::Transporter.new
+ transporter = EWS::Transporter.new
response = transporter.submit(request) # submits using REST (XML) by default
# submit using JSON, or
response = transporter.submit(request, :json)
@@ -56,16 +56,16 @@
request = EWS::Transaction::Request.new({
:transaction_type => :purchase,
:amount => 10.50,
:cardholder_name => "Simon Brown",
:cc_number => "4111111111111111",
- :cc_expiry => "1005", # MUST be YYMM format
+ :cc_expiry => "1012", # MUST be MMYY format
:gateway_id => "XXXXXXX", # which gateway to submit the request to
:password => "YYYYYY" # your password for that gateway
})
- transporter = EWS::Transaction::Transporter.new
+ transporter = EWS::Transporter.new
response = transporter.submit(request) # submits using REST (XML) by default
# you need to know the transaction tag of the transaction you are looking for
find_request = EWS::Transaction::Request.new({
:transaction_type => :transaction_details,
@@ -85,19 +85,19 @@
# The transporter object can be re-used across multiple transactions, so set it up once
# and forget about it.
# In this example, we will continue to use E-xact's default web-service URL, but we
# will specify a default transport_type of :soap
- transporter = EWS::Transaction::Transporter.new(nil, {:transaction_type => :soap})
+ transporter = EWS::Transporter.new("https://api.e-xact.com/", {:transaction_type => :soap})
# now let's submit do a recurring seed purchase...
rsp_req = EWS::Transaction::Request.new({
:transaction_type => :recurring_seed_purchase,
:amount => 12.00,
:cardholder_name => "Simon Brown",
:cc_number => "4111111111111111",
- :cc_expiry => "1005",
+ :cc_expiry => "1012",
:gateway_id => "XXXXXX",
:password => "YYYYYY"
})
rsp_resp = transporter.submit(rsp_req)
@@ -106,10 +106,10 @@
# ...then do multiple refunds against it
1.upto(10) do
rf_req = EWS::Transaction::Request.new({
:transaction_type => :tagged_refund,
:transaction_tag => rsp_resp.transaction_tag, # need to know which transaction we're refunding against...
- :auth_number => rsp_resp.auth_number, # and its auth_number
+ :authorization_num => rsp_resp.authorization_num, # and its authorization_num
:amount => 1.00, # refund a dollar at a time
:gateway_id => "XXXXXX",
:password => "YYYYYY"
})
rf_resp = transporter.submit(rf_req)