[ic] Displaying results of a successful credit card transaction
Kevin Walsh
interchange-users@icdevgroup.org
Wed Jun 11 21:28:00 2003
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
Have fun.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/