[ic] Credit card return values help.

Ed LaFrance interchange-users@icdevgroup.org
Mon Oct 14 11:53:01 2002


At 09:15 PM 10/13/2002 -0500, you wrote:
>Hello,
>
>I'm almost finished with an IC site for a client and need one piece of
>advice:
>
>The site uses real-time CC processing -- which works fine.  The processor
>creates its own order # and returns it via the %result hash as
>$results{'order-id'} and IC generates it's own order number
>(mv_order_number).
>
>My question/s is/are:
>Is there a way to pass mv_order_number to my Globalsub that processes the
>credit cards?
>
>-- or --
>
>How do I access the %result hash (similar to the signio example) returned by
>my Globalsub in my receipt page?
>
>I've tried the obvious things:
>--------------------------
>[perl]
>$Tag->tmp('new_order_id'), $result{'order-id'})
>[/perl]
>
>[scratch new_order_id]
>--------------------------
>gives me nothing.
>
>--------------------------
>[perl]
>$Tag->scratch($result{'order-id'})
>[/perl]
>---------------------------
>also gives me nothing.
>
>Any help or pointers would be appreciated.
>
>Thanks
>Mike K
>kenshin@planetanime.com

A reference to a hash of the results of the payment processing is available 
at $Session->{payment_result}; you can uneval this to get at individual 
values returned by your processor (assuming you used on of the IC payment 
modules which is based on Vend::Payment) - this lets you take a look:

                 <pre>
                [calc]
                    my $string = $Tag->uneval( { ref => 
$Session->{payment_result} });
                    $string =~ s/{/{\n/;
                    $string =~ s/,/,\n/g;
                    return $string;
                [/calc]
                 </pre>

You could just modify the calc to assign selected values to scratch vars, 
write them to a table, etc. Beyond this, you would need to modify the 
payment module in question.

- Ed L.

>

===============================================================
New Media E.M.S.              Technology Solutions for Business
463 Main St., Suite D         eCommerce | Consulting | Hosting
Placerville, CA  95667        edl@newmediaems.com
(530) 622-9421                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (530) 622-9426 Fax
===============================================================