[interchange-cvs] interchange - ramoore modified lib/Vend/Payment/Signio.pm

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Tue Dec 31 09:03:01 2002


User:      ramoore
Date:      2002-12-31 14:02:24 GMT
Modified:  lib/Vend/Payment Signio.pm
Log:
A few changes to Signio payment module
Add new parameter, bin_path, to specify where to find pfpro binary
Look for pfpro before pfpro-file
Look for /lib & /cert directories relative to bin_path if needed

Revision  Changes    Path
2.4       +12 -8     interchange/lib/Vend/Payment/Signio.pm


rev 2.4, prev_rev 2.3
Index: Signio.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Payment/Signio.pm,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -r2.3 -r2.4
--- Signio.pm	12 Oct 2002 11:43:58 -0000	2.3
+++ Signio.pm	31 Dec 2002 14:02:24 -0000	2.4
@@ -1,6 +1,6 @@
 # Vend::Payment::Signio - Interchange Signio support
 #
-# $Id: Signio.pm,v 2.3 2002/10/12 11:43:58 jon Exp $
+# $Id: Signio.pm,v 2.4 2002/12/31 14:02:24 ramoore Exp $
 #
 # Copyright (C) 1999-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 
 =head1 Interchange Signio Support
 
-Vend::Payment::Signio $Revision: 2.3 $
+Vend::Payment::Signio $Revision: 2.4 $
 
 =head1 SYNOPSIS
 
@@ -227,7 +227,7 @@
 
     my $exe;
 
-	my @try = split /:/, $ENV{PATH};
+	my @try = split /:/, (charge_param('bin_path') || $ENV{PATH});
 	unshift @try,
 			"$Global::VendRoot/lib",
 			"$Global::VendRoot/bin",
@@ -236,13 +236,13 @@
 
 	my $stdin;
 	for(@try) {
-		if(-f "$_/pfpro-file" and -x _) {
-			$exe = "$_/pfpro-file";
-			$stdin = 1;
+		if(-f "$_/pfpro" and -x _) {
+			$exe = "$_/pfpro";
 			last;
 		}
-		next unless -f "$_/pfpro" and -x _;
-		$exe = "$_/pfpro";
+		next unless -f "$_/pfpro-file" and -x _;
+		$exe = "$_/pfpro-file";
+		$stdin = 1;
 		last;
 	}
 
@@ -259,6 +259,7 @@
 			"$Global::VendRoot/lib",
 			"$Global::VendRoot/bin",
 			"$Global::VendRoot",
+			charge_param('bin_path') . "/../lib",
 			;
 	$ENV{LD_LIBRARY_PATH} = join ':', @try;
 
@@ -270,6 +271,7 @@
 					"$Global::VendRoot/lib",
 					'/usr/local/ssl',
 					'/usr/lib/ssl',
+					charge_param('bin_path') . "/..",
 				);
 		for(@try) {
 			next unless  -d "$_/certs";
@@ -440,6 +442,8 @@
     
     my $result = join "", <CONNECT>;
     close CONNECT;
+
+    unlink $tempfile;
 
 #::logDebug(qq{signio decline=$decline result: $result});