Jason Ehmke
Jason Ehmke

Reputation: 125

Send Order ID to Authorize.net Instead of Transaction ID in Magento

I'm using the authorize.net module in Magento 1.7 to process credit card transactions. Right now, the transaction ID is sent, not the order number. Is there any way to send the Order number instead?

Would I change ->setLastTransId($response->getTransactionId()) to getOrderID on line 1367 of app/code/core/Mage/Paygate/Model/Authorize.net?

Of course, I wouldn't change the core files, I'd copy it to local first.

Upvotes: 1

Views: 673

Answers (1)

garth.subscribepro
garth.subscribepro

Reputation: 116

It looks like currently the Authorize.Net payment method in Magento Community Edition 1.7 sends the order increment Id number (What is typically considered the order number) to the Authorize.Net gateway in the XInvoiceNum field. See lines 1154 to 1156 in app/code/core/Mage/Paygate/Model/Authorizenet.php:

    if ($order && $order->getIncrementId()) {
        $request->setXInvoiceNum($order->getIncrementId());
    }

One possible way to get more order information into Authorize.Net from Magento is to use Authorize.Net's CIM (Customer Information Manager) version of the gateway, along with a Magento payment method such as ours:

http://www.storefrontconsulting.com/authorize-net-cim-saved-credit-cards-extension-for-magento/

Upvotes: 1

Related Questions