NodsDorf Posted March 18, 2009 Share Posted March 18, 2009 We have the Authorize.net (AIM) module installed it works fine except the data auth.net gets always shows an invoice number of 1. Is there a way to get the module to pass them the order number as the invoice number? Any help or suggestions is very much appreciated. Thank you. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 29, 2009 Share Posted March 29, 2009 Hello, We are having the same problem with the SIM module of Authorize.net. The only exception is that from authorize.net, the Invoice number in the email notification is left blank. Having the order number passed to the invoice number field at authorize.net is crucial to correctly matching order notifications to orders in our OS Admin. Can anyone help with this issue, or point us to where it may already be posted in the forum. I have yet to find a matching entry. Thank you, Olivia www.cityofstrength.com Quote Link to comment Share on other sites More sharing options...
Guest Posted April 30, 2009 Share Posted April 30, 2009 Check out the Authorize Net AIM Invoice Number Fix contribution Quote Link to comment Share on other sites More sharing options...
naten Posted July 10, 2009 Share Posted July 10, 2009 Check out the Authorize Net AIM Invoice Number Fix contribution I just installed the latest Authorize.net AIM from http://addons.oscommerce.com/info/4091 and I'm getting the same thing, invoice number is always 1, instead of using the order number. Is there a quick and dirty way to fix this? Quote Link to comment Share on other sites More sharing options...
nealc Posted August 27, 2009 Share Posted August 27, 2009 I just installed the latest Authorize.net AIM from http://addons.oscommerce.com/info/4091 and I'm getting the same thing, invoice number is always 1, instead of using the order number. Is there a quick and dirty way to fix this? Change this: // Calculate the next expected order id $last_order_id = tep_db_query("select * from " . TABLE_ORDERS . " order by orders_id desc limit 1"); $new_order_id = $last_order_id->fields['orders_id']; //$new_order_id = ($new_order_id + 1); And comment out like this: // Calculate the next expected order id //$last_order_id = tep_db_query("select * from " . TABLE_ORDERS . " order by orders_id desc limit 1"); //$new_order_id = $last_order_id->fields['orders_id']; //$new_order_id = ($new_order_id + 1); Add this code just below the above code: // A.NET INVOICE NUMBER FIX // find the next order_id to pass as x_Invoice_Num $next_inv = ''; $inv_id = tep_db_query("select orders_id from " . TABLE_ORDERS . " order by orders_id DESC limit 1"); $last_inv = tep_db_fetch_array($inv_id); $next_inv = $last_inv['orders_id']+1; // END A.NET INVOICE NUMBER FIX And change this here: 'x_invoice_num' => $new_order_id, To this: 'x_invoice_num' => $next_inv, You will then see the invoice number attached to your order in Authorize.net! Quote I am currently just learning osCommerce and PHP, but am always willing to help out. Have successfully installed the following: Discount Coupons, UPS shipping module, Ultimate SEO URL's, Easy Meta Tags for SEO 1.0, Google XML Sitemap SEO v1.3, HTML Editor for Email and Newsletters. Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 27, 2009 Share Posted August 27, 2009 We have the Authorize.net (AIM) module installed it works fine except the data auth.net gets always shows an invoice number of 1. Is there a way to get the module to pass them the order number as the invoice number?No, not accurately. The invoice number is created after the charge is complete at authorize.net. The code can guess at the number, as mentioned in this thread, but on a busy site that could be wrong. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons 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.
Note: Your post will require moderator approval before it will be visible.