[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Java Payflow Pro on Interchange
> From: Josh Lavin
>
> 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!
Good to hear :) The script did not take long to come up with, it was
finding a jvm that would compile and run on our alpha that was tough.
>
> > 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.
Try changing:
my $decline = $result{'pop.status'};
to
my $decline = $result{'RESULT'};
It looks like the module in IC 4.8.x changed the result map. See in the
old result map pop.status = RESULT. Pop.status now equals ICSTATUS in
the new module which appears to always be 0.
>
> 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?
$decline will be a non zero number that corresponds to a result code
from Verisign. I'm not sure what ICSTATUS is used for or where it's
set, I haven't spent much time with the new Verisign module besides
getting it running on a non JVM environment.
Good luck,
-Ron