[ic] Java Payflow Pro on Interchange

Ron Phipps interchange-users@icdevgroup.org
Tue Jun 11 01:36:02 2002


> From: Josh Lavin
> 
> Hello,
> 
> I am developing an e-commerce website with Interchange. We are using
> Verisign's Payflow Pro for payment processing with their Java API. I
> found Ron Phipps' email on using the Java version with a wrapper here:
> http://interchange.redhat.com/archive/interchange-
> users/2001/msg08286.html
> 

Getting the JDK running on linux alpha was a major pain; I sure hope it
was easier on your FreeBSD box :)

> I have the wrapper all set up and working (we're on FreeBSD), but then
I
> noticed that Interchange would approve every sale whether or not
> Verisign did. I needed to have the wrapper return the string that
> Verisign gives.

Yup it definitely does that since the default signio/verisign module
checks the value of $? which will always be 0 if the call to the jvm was
successful.

> I looked at Ron's list email again, and found he said "The only thing
> that I needed to change in the actual Verisign sub on the IC side was
to
> check the value of the result key instead of the return code of the
> program (since we we're calling a wrapper in which the return code
would
> always be 0 if the wrapper was ran successfully, irregardless of
whether
> the java code returned a non 0 value)."
> 
> Can anyone tell me where to change this return key value?

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:

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