module ActiveMerchant::Billing::Base
Constants
- GATEWAY_MODE_DEPRECATION_MESSAGE
Public Class Methods
gateway(name)
click to toggle source
Return the matching gateway for the provider
-
bogus
:BogusGateway
- Does nothing (for testing) -
moneris
:MonerisGateway
-
authorize_net
:AuthorizeNetGateway
-
trust_commerce
:TrustCommerceGateway
ActiveMerchant::Billing::Base.gateway
(‘moneris’).new
# File lib/active_merchant/billing/base.rb, line 30 def self.gateway(name) name_str = name.to_s.strip.downcase raise(ArgumentError, 'A gateway provider must be specified') if name_str.blank? begin Billing.const_get("#{name_str}_gateway".camelize) rescue raise ArgumentError, "The specified gateway is not valid (#{name_str})" end end
gateway_mode()
click to toggle source
# File lib/active_merchant/billing/base.rb, line 16 def self.gateway_mode ActiveMerchant.deprecated(GATEWAY_MODE_DEPRECATION_MESSAGE) @@mode end
gateway_mode=(mode)
click to toggle source
# File lib/active_merchant/billing/base.rb, line 11 def self.gateway_mode=(mode) ActiveMerchant.deprecated(GATEWAY_MODE_DEPRECATION_MESSAGE) @@mode = mode end
test?()
click to toggle source
A check to see if we’re in test mode
# File lib/active_merchant/billing/base.rb, line 43 def self.test? mode == :test end