Method: ActiveMerchant::Billing::UsaEpayAdvancedGateway#initialize

Defined in:
lib/active_merchant/billing/gateways/usa_epay_advanced.rb

#initialize(options = {}) ⇒ UsaEpayAdvancedGateway

Create a new gateway.

Required

  • At least the live_url OR the software_id must be present.

    • :software_id – 8 character software id

    OR

    • :test_url – full url for testing

    • :live_url – full url for live/production

Optional

  • :soap_response – set to true to add :soap_response to the params hash containing the entire soap xml message



271
272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/active_merchant/billing/gateways/usa_epay_advanced.rb', line 271

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

  if options[:software_id]
    self.live_url = "#{LIVE_URL_BASE}#{options[:software_id]}"
    self.test_url = "#{TEST_URL_BASE}#{options[:software_id]}"
  else
    self.live_url = options[:live_url].to_s
    self.test_url = options[:test_url].to_s if options[:test_url]
  end

  super
end