Class: ActiveMerchant::Billing::SecurePayAuGateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/active_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

Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS

Instance Attribute Summary

Attributes inherited from Gateway

#options

Instance Method Summary collapse

Methods inherited from Gateway

#card_brand, card_brand, inherited, supports?

Methods included from Utils

generate_unique_id

Methods included from CreditCardFormatting

#format

Methods included from RequiresParameters

#requires!

Methods included from PostsData

included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request

Constructor Details

#initialize(options = {}) ⇒ SecurePayAuGateway

Returns a new instance of SecurePayAuGateway.



41
42
43
44
45
# File 'lib/active_merchant/billing/gateways/secure_pay_au.rb', line 41

def initialize(options = {})
  requires!(options, :login, :password)
  @options = options
  super
end

Instance Method Details

#purchase(money, credit_card, options = {}) ⇒ Object



51
52
53
# File 'lib/active_merchant/billing/gateways/secure_pay_au.rb', line 51

def purchase(money, credit_card, options = {})
  commit :purchase, build_purchase_request(money, credit_card, options)
end

#test?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/active_merchant/billing/gateways/secure_pay_au.rb', line 47

def test?
  @options[:test] || super
end