[ic] how does a custom charge globalsub get mv_order_number?

Jason Kohles jason@mediabang.com
Wed, 20 Dec 2000 10:59:49 -0700

I am in the process of adding a new payment method, and have a little
trouble.  The authorizenet globalsub in eg/ uses $actual{'mv_order_number'}
to get an order number, but when I try the same method, I get undef (I
also get undef when trying it with authorizenet, which may explain why so
many people have trouble getting authorizenet to work).

After a little code searching I thought perhaps
Vend::Order::update_order_number was the key, but that doesn't seem to do
anything when called from a globalsub.  I discovered by accident that if I
just return an order-id of 1, then I do get unique order numbers, but it
skips all the even numbers, which seems less than ideal and I suspect will
break something else somewhere down the line.

So the question is, is a unique order number assigned at some point before
the custom charge sub is called?  If it is, how can I find out what number was
assigned to it, and if it isn't, then how can I convince interchange to do so?

Jason Kohles -- jason@mediabang.com              phone  (801)364-0185
http://www.mediabang.com/                        fax    (801)364-0186

   Far better it is to dare mighty things, to win glorious triumphs, even
   though checkered by failure, than to take rank with those poor spirits
   who neither enjoy much nor suffer much, because they live in the grey
   twilight that knows not victory nor defeat.  -- Theodore Roosevelt