Class: ActiveMerchant::Billing::UsaEpayGateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/usa_epay.rb

Overview

Delegates to the appropriate gateway, either the Transaction or Advanced depending on options passed to new.

Constant Summary

Constants inherited from Gateway

Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS

Instance Attribute Summary

Attributes inherited from Gateway

#options

Class Method Summary collapse

Methods inherited from Gateway

#card_brand, card_brand, inherited, #initialize, supports?, #test?

Methods included from CreditCardFormatting

#format

Constructor Details

This class inherits a constructor from ActiveMerchant::Billing::Gateway

Class Method Details

.new(options = {}) ⇒ Object

Creates an instance of UsaEpayTransactionGateway by default, but if :software id or :live_url are passed in the options hash it will create an instance of UsaEpayAdvancedGateway.



16
17
18
19
20
21
22
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 16

def self.new(options={})
  unless options.has_key?(:software_id) || options.has_key?(:live_url)
    UsaEpayTransactionGateway.new(options)
  else
    UsaEpayAdvancedGateway.new(options)
  end
end