Shopify/active_merchant — pull request #1048 by pdamer (2014-02-24 17:30:27+00:00)
Title: fix ordering of order/trans_id for auth.net cim.

When processing a refund in Auth.net CIM the order fields need to come before the transId field in order to include the invoice number on the credit transaction. Without this commit including :order => {:invoice_num => 'xxxx'} on a refund transaction fails.

I was working on some remote tests to verify this change but it is very difficult to automate the test. The connection needs to be in live mode to the test server because otherwise you don't get a valid transId. Also you can't refund transactions until they have been settled which usually happens overnight.