marvin
marvin

Reputation: 479

how to send live transaction to test server authorize.net via activemerchant

I need to send my sample transactions as "live" transactions to the test gateway for authorize.net so that they show up in the reports on their website under my test account. Test transactions are not processed and wont show up in the reports.

The problem is that when I connect to the gateway, I have to specify test mode to get to the test servers, and due to that (in the gateway commit code) all my purchase requests are sent across with the x_test_request parm. I tried sending an option to the purchase method of { test: false } but that didn't work.

How can I do this? I'm using ruby/rails (obviously). Thanks.

Upvotes: 1

Views: 197

Answers (1)

Ethan
Ethan

Reputation: 400

Got it... Had to fork and play around with the active_merchant gem to figure it out.

Connect to your CIM Gateway with the :test_requests=>false option. This will prevent the

<extraOptions>x_test_request=TRUE</extraOptions>

from showing up in the XML. So it should look like this (with your credentials)

ActiveMerchant::Billing::AuthorizeNetCimGateway.new({:login => AUTHNET_TEST_LOGIN, :password => AUTHNET_TEST_TRANS_KEY, :test_requests=>false})

Upvotes: 2

Related Questions