Per gateway test mode

15 views
Skip to first unread message

Adam Cigánek

unread,
Sep 21, 2009, 7:26:57 AM9/21/09
to Active Merchant
Hello,

Sometimes, it might be useful to allow to switch a payment gateway to
test mode even if application runs in production environment.
Apparently, this should be possible with the :test => true option:

ActiveMerchant::Billing::AuthorizeNetGateway.new(:login =>
'...', :password => '...', :test => true)

This, however, does not seem to work. Look:

ActiveMerchant::Billing::Base.mode = :production
gateway = ActiveMerchant::Billing::AuthorizeNetGateway.new(:login =>
'...', :password => '...', :test => true)
gateway.test? # I expect true here, but returns false

Is this a bug or am I missing something?
Reply all
Reply to author
Forward
0 new messages