[ic] Authorize.Net Missing Order Number

Mike Heins interchange-users@icdevgroup.org
Sat Jun 22 08:48:03 2002


Quoting C.B. Currier (cbcurrier@spinrx.com):
> Mike Heins said:
> > Quoting Russ Mann (tech@khouse.org):
> >> > I think it may have to do with the order process. An order number is
> >> > not created until the transaction is completed, at which time IC
> >> > says "make it so" and assigns the order number. To pass it to the
> >> > authnet gateway, one thinks that IC would have to assign the receipt
> >> > number "before" the transaction is verified and successful....
> >> >
> >> > May mean just another sub to create, but what does it do, "hold" an
> >> > order number waiting for a successful transaction, what if there is
> >> > never success?
> >> > Junk the number? Then you have missing numbers in your order query.
> >> > Assign the number back to the order_number file, what if second
> >> > shopper came and went already? Then you have a quandary...
> >> >
> >> > "if" this is the scenario, it could be fixed with some a coding....
> >> >
> >> > RS
> >>
> >>
> >> Ok, that's understandable.  Alternative way to do this: Make a unique
> >> number for each "attempted" order and log it in the database.  It will
> >> not be the actual order number, but it is a field we could print out
> >> on the email report and in the UI admin to correlate the CC charge
> >> with the actual order.
> >>
> >> IC Gurus, does this sound like a reasonable solution?
> >
> > That is what happens now with the order ID. I don't know why
> > that reference number is not passed in, I am guessing it is
> > just a bug.
> >
> > Probably the line which says:
> >
> > 		x_Trans_ID
> 	=> $actual->{order_id},
> >
> > Needs to say:
> >
> > 		x_Trans_ID
> 	=> $actual->{order_id} || $order_id,
> >
> 
> That works mike but gives you a ten digit string which looks like a
> timestamp id not the final order ID the system allocates to the approved
> order.Maybe it would be better to assign the timestamp id as the actual order ID.

That is certainly up to the individual. My view is that the use of it
is as a link to the Authorizenet information, and that it does
not necessarily need to be the order number. You can just save it
in the transaction database to provide the link.

> I have done that in other systems, that way there will be no potential of
> redundancy.  So how could you assign this number to be the final Number?

You can just assign it to $Session->{mv_order_number} at time of payment,
and it will be used instead of the counter number.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting
phone +1.513.523.7621      <mike@perusion.com>

How far can you open your mind before your brains fall out?