[ic] Setting order number after payment is taken in 5.2.0

Mike Heins mike at perusion.com
Mon Jun 21 16:04:37 EDT 2004

Quoting Akash Shah (ic_user at hotmail.com):
> Hi,
> I upgraded my foundation based catalog to 5.2.0 and as per the readme for 
> the change log, made changes for credit card. Here is the change that i made
> quoting change log
> ***
> At that point, in the current foundation, you would add this code to
>  assign an order number *after* payment is taken.
> 	Set order number in values: [value
>                        name=mv_order_number
>                        set="[counter
> name=`$Session->{current_route}{counter_name}
> 										|| 'etc/order.number'
> 									 `
>                                sql=`$Session->{current_route}{sql_counter}`
> start=`$Session->{current_route}{first_order_number}`
> date=`$Session->{current_route}{date_counter}`
>                            ]"
>                    ]
> 	Set order number in session: [calc]
>                        $Session->{mv_order_number} = 
> $Values->{mv_order_number};
>                    [/calc]
>  This allows the order numbers to increment only after payment has been
>  received, while still allowing the all-in-one transaction logging
>  file located in a report file.
>  If you use counter_tid, you *must* set set the order number in your
>  logging file if you want it to be available.
> *****
> this works fine for credit card transactions, but we also accept the 
> "POSTAL_ACCEPT" - call in or fax the payment information. for this case, 
> the order number came out as empty string.  Is this a bug ? or do I need to 
> modify my etc/log_transaction for this payment type and set order number 
> for every payment type that i accept ?

You must have taken me literally and put it inside the [elsif] block
for the realtime payment.

The answer is you just add it after the [catch] for payment errors. That
way it happens for all payment types.

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

Few blame themselves until they have exhausted all other possibilities.
 -- anonymous

More information about the interchange-users mailing list