By default, your Order ID will not be passed to Authorize.Net. In order to make it available, you will need to modify "authorizenet_cc_aim.php":
nano catalog/includes/modules/payment/authorizenet_cc_aim.php
Locate the code below:
function before_process() {
global $HTTP_POST_VARS, $customer_id, $order, $sendto, $currency;
Paste the following code after it:
$last_order_id = tep_db_query("select * from ".TABLE_ORDERS." order by orders_id desc limit 1");
$last_inv = tep_db_fetch_array($last_order_id);
$new_order_id = $last_inv['orders_id'] + 1;
Then, locate another piece of code:
$params = array('x_login' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID, 0, 20),
'x_tran_key' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_KEY, 0, 16),
'x_version' => '3.1',
'x_delim_data' => 'TRUE',
'x_delim_char' => ',',
'x_encap_char' => '"',
'x_relay_response' => 'FALSE',
'x_first_name' => substr($order->billing['firstname'], 0, 50),
'x_last_name' => substr($order->billing['lastname'], 0, 50),
'x_company' => substr($order->billing['company'], 0, 50),
'x_address' => substr($order->billing['street_address'], 0, 60),
'x_city' => substr($order->billing['city'], 0, 40),
'x_state' => substr($order->billing['state'], 0, 40),
'x_zip' => substr($order->billing['postcode'], 0, 20),
'x_country' => substr($order->billing['country']['title'], 0, 60),
'x_phone' => substr($order->customer['telephone'], 0, 25),
'x_cust_id' => substr($customer_id, 0, 20),
Paste after it:
'x_invoice_num' => $new_order_id,
Run transaction, and you will see that Invoice # will be equal to Order ID.
We have 6 guests and no members online