Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RC2a - No Invoice # - Why not?


Sethman

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...