Sethman Posted August 15, 2008 Share Posted August 15, 2008 I have installed a fresh RC2a and run the Authorize.net AIM payment module. Everything works just fine, but the invoice # is missing from the order. Does anyone know how to fix this so that it passes that information? Quote Link to comment Share on other sites More sharing options...
RookuhShay Posted August 15, 2008 Share Posted August 15, 2008 In the Payment module authorizenet_cc_aim.php find the function function before_process() Add // Calculate the next expected order id $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; Just after line global $HTTP_POST_VARS, $customer_id, $order, $sendto, $currency; Near the top. Then Add line: x_invoice_num => $new_order_id, Just after lines: x_phone => $order->customer['telephone'], x_email => $order->customer['email_address'], x_cust_id => $_SESSION['customer_id'], in the same function. Enjoy, RookuhShay Quote Link to comment Share on other sites More sharing options...
Sethman Posted August 16, 2008 Author Share Posted August 16, 2008 Thank you! Works wonders! I had the right idea, just couldn't get my syntax right. ;) Quote Link to comment Share on other sites More sharing options...
robinwarren Posted September 16, 2008 Share Posted September 16, 2008 :rolleyes: This worked perfectly. Thank you thank you! The OSCommerce forum is awesome! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.