Jump to content
Sign in to follow this  
Sethman

RC2a - No Invoice # - Why not?

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thank you! Works wonders! I had the right idea, just couldn't get my syntax right. ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×