Class: MerbMerchant::Billing::SecurePayAuGateway
- Defined in:
- lib/merb_merchant/billing/gateways/secure_pay_au.rb
Constant Summary collapse
- API_VERSION =
'xml-4.2'
- TEST_URL =
'https://www.securepay.com.au/test/payment'
- LIVE_URL =
'https://www.securepay.com.au/xmlapi/payment'
- TRANSACTIONS =
0 Standard Payment 4 Refund 6 Client Reversal (Void) 10 Preauthorise 11 Preauth Complete (Advice)
{ :purchase => 0, :authorization => 10, :capture => 11, :void => 6, :credit => 4 }
- SUCCESS_CODES =
[ '00', '08', '11', '16', '77' ]
Constants inherited from Gateway
Constants included from PostsData
PostsData::MAX_RETRIES, PostsData::OPEN_TIMEOUT, PostsData::READ_TIMEOUT
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SecurePayAuGateway
constructor
A new instance of SecurePayAuGateway.
- #purchase(money, credit_card, options = {}) ⇒ Object
- #test? ⇒ Boolean
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?
Methods included from Utils
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
Constructor Details
#initialize(options = {}) ⇒ SecurePayAuGateway
Returns a new instance of SecurePayAuGateway.
41 42 43 44 45 |
# File 'lib/merb_merchant/billing/gateways/secure_pay_au.rb', line 41 def initialize( = {}) requires!(, :login, :password) @options = super end |
Instance Method Details
#purchase(money, credit_card, options = {}) ⇒ Object
51 52 53 |
# File 'lib/merb_merchant/billing/gateways/secure_pay_au.rb', line 51 def purchase(money, credit_card, = {}) commit :purchase, build_purchase_request(money, credit_card, ) end |
#test? ⇒ Boolean
47 48 49 |
# File 'lib/merb_merchant/billing/gateways/secure_pay_au.rb', line 47 def test? @options[:test] || super end |