[ic] Displaying results of a successful credit card transaction

Stefan Hornburg interchange-users@icdevgroup.org
Thu Jun 12 14:38:00 2003


On Thu, 12 Jun 2003 10:51:02 -0700
Scott Goodman <scott@idearesource.com> wrote:

> >
> >
> >Scott Goodman [scott@idearesource.com] wrote:
> >  
> >
> >>I'm trying to find out how to get access to the contents of the
> >$result >hash returned by the payment modules. My receipt page needs
> >to display >the bank approval code, transaction id, and some other
> >things returned >by the payment processor.  I've tried this on the
> >receipt after poking >in the source for the pyament modules, but
> >nothing is displayed:>
> >>
> >>    [calc]
> >>        $Tag->uneval( { ref => $Session->{payment_result} );
> >>    [/calc]
> >>
> >>
> >>    
> >>
> >Perhaps you need a UserTag that you can call like this:
> >
> >    [payment-result key="auth-code"]
> >
> >Well, today's your lucky day...
> >
> >    UserTag payment_result Order key
> >    UserTag payment_result Routine <<EOR
> >    sub {
> >        my $key = shift;
> >        my $result = $::Session->{payment_result} || return undef;
> >
> >        return ($result->{$key} || $result->{"pop.$key"});
> >    }
> >    EOR
> >
> >  
> >
> Thanks Kevin,
> 
> I'm not sure, but it seems the contents of $::Session are not
> available after  the completion of the order, on the receipt page.
> I've tried adding some debug logging to your tag and $::Session or 
> $::Session->{payment_result} is undefined. Is something missing?

In a catalog user tag you need to remove ::, so $Session instead
of $::Session.

Ciao
	Racke



-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team