Class: MerchantSidekick::ActiveMerchant::Gateways::AuthorizeNetGateway
- Defined in:
- lib/merchant_sidekick/active_merchant/gateways/authorize_net_gateway.rb
Class Method Summary collapse
-
.gateway ⇒ Object
Returns an active merchant authorize net gateway instance unless there is already one assigned.
Methods inherited from Base
Methods inherited from Gateway
config, config_path, default_gateway, type
Class Method Details
.gateway ⇒ Object
Returns an active merchant authorize net gateway instance unless there is already one assigned.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/merchant_sidekick/active_merchant/gateways/authorize_net_gateway.rb', line 11 def gateway unless @@gateway ::ActiveMerchant::Billing::Base.mode = :test if config[:mode] == "test" @@gateway = ::ActiveMerchant::Billing::AuthorizeNetGateway.new({ :login => config[:login_id], :password => config[:transaction_key] }.merge(config[:mode] == "test" ? {:test => true} : {})) end @@gateway end |