News:

Support the VirtueMart project and become a member

Main Menu

How to sync VM order number with AN Invoice Number?

Started by deathorglory, November 29, 2011, 15:20:56 PM

Previous topic - Next topic

deathorglory

I am trying to sync the Order Numbers from virtuemart to be the same for the invoice numbers in Authorize.net but cant seem to find any information on it.

Currently an example of what is going on is:

VM Order Number  : 0000002
AN Invoice Number: 129_fjd89923kaf

The number appears to be completely random, and when dealing with dozens of orders a day, it would make life easier if these numbers matched.

Anyone have any idea? Or can anyone confirm their numbers match out of the box?

Thanks

deathorglory

To help aid in this situation.

I figured out in ps_checkout an order number is created here:

function get_order_number() {
global $auth;

/* Generated a unique order number */

$str = session_id();
$str .= (string)time();

$order_number = $auth['user_id'] .'_'. md5($str);

return substr($order_number, 0, 32);
}


I also figured out that $order_id is what I am trying to pass through to Authorize to show up for their invoice number field. I have tried everything from making $order_number = $order_id, both in the above section as well in ps_authorize code, but no luck. Once I change something I end up getting an empty field with no order_id whatsoever.

Any help on how to get the order_id (vm order number) to display in the Authorize.net Invoice Number Field would be GREATLY appreciated.

William Dooley

I also need this. PLEASE can anyone help us.

Thanks,
William
Thanks,
William

deathorglory

This has to be a simple fix, any dev have any input? Everything I try ends up in blank order numbers...

Joseph Kwan

Before VM receive the confirmation from authorize.net, the order is not created yet and so there is no order id. The order number is just a temporary number created to identify the transaction.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.