[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Java Payflow Pro on Interchange
On Tuesday, June 11, 2002, at 12:27 AM, Ron Phipps wrote:
> Getting the JDK running on linux alpha was a major pain; I sure hope it
> was easier on your FreeBSD box :)
It wasn't too hard; I just customized your wrapper script a little.
Without that, I would have been way lost!
> Are you running IC 483? My modifications were to the signio module in
> ic 4.6.x. However if you are using IC 483 try the following which is
> untested:
I _am_ running 4.8.3.
> Remove this line:
>
> $decline = $?;
>
> Add this line:
> my $decline = $result{'pop.status'};
>
> Right above:
> if ($decline) {
> $decline = $decline >> 8;
>
> So it will look something like this:
>
> my %result = split /[&=]/, $result;
>
> my $decline = $result{'pop.status'};
>
> if ($decline) {
> $decline = $decline >> 8;
> $result{ICSTATUS} = 'failed';
>
> Good luck,
> -Ron
I did as you suggested; however, it still is approving every sale. Here
is a snippet from my Signio.pm:
######
::logDebug(qq{signio call: $exe $server $port "$string" $timeout >
$tempfile});
system(qq{$exe $server $port "$string" $timeout >
$tempfile});
}
#$decline = $?;
open(CONNECT, "< $tempfile")
or die ::errmsg("open %s: %s\n", $tempfile, $!);
my $result = join "", <CONNECT>;
close CONNECT;
::logDebug(qq{signio decline=$decline result: $result});
my %result_map = ( qw/
MStatus ICSTATUS
pop.status ICSTATUS
order-id PNREF
pop.order-id PNREF
pop.auth-code AUTHCODE
pop.avs_code AVSZIP
pop.avs_zip AVSZIP
pop.avs_addr AVSADDR
/
);
my %result = split /[&=]/, $result;
my $decline = $result{'pop.status'};
if ($decline) {
$decline = $decline >> 8;
$result{ICSTATUS} = 'failed';
#####
The 2nd log debug you see there shows decline=0 when it runs, because I
haven't defined $decline yet. Then, we define $decline as pop.status,
which I see is set to ICSTATUS. When I look at my icdebug file, ICSTATUS
always says "success," (so does pop.status) but RESULT = 12 and
RESPMSG=Declined.
Now, I'm no Perl guru, but when the perl script says
$decline=$decline>>8, doesn't that see if decline equals 8 or more? The
way we define decline is with a string, pop.status.
Here's my icdebug output:
-------
Vend::Payment:debug: signio decline=0 result:
RESULT=12&PNREF=VRNA45479263&RESPMSG=Declined&AVSADDR=N&AVSZIP=N
Vend::Payment:debug: signio decline=0 result: {
'RESPMSG' => 'Declined',
'pop.avs_addr' => 'N',
'pop.order-id' => 'VRNA45479263',
'ICSTATUS' => 'success',
'MStatus' => 'success',
'order-id' => 'VRNA45479263',
'AVSADDR' => 'N',
'PNREF' => 'VRNA45479263',
'RESULT' => '12',
'pop.status' => 'success',
'pop.avs_code' => 'N
',
'AVSZIP' => 'N
',
'pop.avs_zip' => 'N
'
}
-------
What is Interchange expecting for $decline? And, where does ICSTATUS get
it's stuff from? Or, did I miss something here?
Thanks,
Josh Lavin