Author Topic: How to sync VM order number with AN Invoice Number?  (Read 7209 times)

deathorglory

  • Beginner
  • *
  • Posts: 8
How to sync VM order number with AN Invoice Number?
« on: November 29, 2011, 15:20:56 pm »
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

  • Beginner
  • *
  • Posts: 8
Re: How to sync VM order number with AN Invoice Number?
« Reply #1 on: November 29, 2011, 16:53:49 pm »
To help aid in this situation.

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

Code: [Select]
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

  • Jr. Member
  • **
  • Posts: 243
Re: How to sync VM order number with AN Invoice Number?
« Reply #2 on: December 04, 2011, 04:19:02 am »
I also need this. PLEASE can anyone help us.

Thanks,
William
Thanks,
William

deathorglory

  • Beginner
  • *
  • Posts: 8
Re: How to sync VM order number with AN Invoice Number?
« Reply #3 on: December 12, 2011, 17:38:32 pm »
This has to be a simple fix, any dev have any input? Everything I try ends up in blank order numbers...

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: How to sync VM order number with AN Invoice Number?
« Reply #4 on: December 16, 2011, 22:59:30 pm »
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.

mordeng

  • Beginner
  • *
  • Posts: 11
Re: How to sync VM order number with AN Invoice Number?
« Reply #5 on: May 15, 2012, 10:08:08 am »
bump

same problem her, any solutions yet?

edit: k i saw its v1.1 would need it in current version-....