Fail:(TESTMODE) Transactions of this market type c

2019-07-18 13:27发布

问题:

I have created a test account with Authorize.net and am using ActiveMerchant to process credit card payments for a website. What error I always get is Error#*87 - "Transactions of this market type cannot be processed on this system" mentioned in ActiveMerchant documentations. Any suggestions how to resolve this error ? Following is how i created my gateway. I also checked gateway.test? and it returns true.

 gateway = ActiveMerchant::Billing::Base.gateway(:authorized_net).new(
        :login =>'API Login ID',
        :password =>'Transaction Key',
        :test => true)

回答1:

Try

gateway = ActiveMerchant::Billing::AuthorizeNetGateway.new(
                                              :login => 'API Login ID', 
                                              :password => 'Transaction Key',
                                              :test => true)