bbyyaa Posted September 9, 2009 Share Posted September 9, 2009 Used the following codes in authorizenet_aim.php inside before_process function. It works fine when the traffic is small. It sometimes produces duplicate invoice number passing to authorize net when the traffic is heavy or the orders were placed close each other though. Any suggestion to fix it? Thanks for any help in advance. $last_order_id = tep_db_query("select * from " . TABLE_ORDERS . " order by orders_id desc limit 1"); $last_order = mysql_fetch_array($last_order_id); $new_order_id = $last_order['orders_id']; $new_order_id = ($new_order_id + 1); 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.