[ic] Bad GlobalSub

Richard Eicher II interchange-users@lists.akopia.com
Thu Jul 5 10:36:00 2001


Hello,

Here is my global sub linkpt:

GlobalSub <<EOS
sub linkpt {
package LPERL;
#use strict;
no strict;
use lperl;
#use LPERL 'CapturePayment';
$lperl = new
LPERL("/usr/lib/interchange/eg/LPERL/lbin",
"$LPERL::EASYFUNCS");
my $hostname           = "secure.linkpt.net";
my $port               = "1139";
my $storename          = "370544";
my $keyfile            =
"/usr/lib/interchange/eg/certs/cert.pem";
my $transactionresult  = "GOOD";
my $testip   = "127.0.0.1";

$transaction_hash = {
     hostname        => $hostname,
     port            => $port,
     storename       => $storename,
     keyfile         => $keyfile,
     orderID         => '',
     result          => $transactionresult,
     cardNumber      => $_[0],
     cardExpMonth    => $_[1],
     cardExpYear     => $_[2], 
     name            => $_[3],
     email           => $_[4],
     phone           => $_[5],
     address         => $_[6],
     city            => $_[7],
     state           => $_[8],
     zip             => $_[9],
     country         => $_[10],
     tax             => $_[11],
     shipping        => $_[12],
     subtotal        => $_[13],
     amount          => $_[14],
     saddr1          => $_[15],
     scity           => $_[16],
     sstate          => $_[17],
     szip            => $_[18],
     scountry        => $_[19],
     ip              => $testip,
 };

%ret = $lperl->CapturePayment($transaction_hash);
$neworderID = $ret{'neworderID'};
$statusCode = $ret{'statusCode'};
my %result;
if ($statusCode == 1) {$result{MStatus} =
'success';
}
elsif ($statusCode == 0) {$result{MStatus} =
$statusMessage;
}

$result{'order-id'} = $neworderID;
::logDebug("CapturePayment: statusCode:
$ret{'statusCode'}\n");
::logDebug("CapturePayment: statusMessage:
$ret{'statusMessage'}\n");
::logDebug("CapturePayment: AVSCode:
$ret{'AVSCode'}\n");
::logDebug("CapturePayment: trackingID:
$ret{'trackingID'}\n");
::logDebug("CapturePayment: neworderID:
$ret{'neworderID'}\n");
::logDebug("CapturePayment: statusApproval:
$ret{'statusApproval'}\n");
::logDebug("CapturePayment: subtotal:
$ret{'subtotal'}\n");
::logDebug("CapturePayment: tax: $ret{'tax'}\n");
::logDebug("CapturePayment: time:
$ret{'time'}\n");
::logDebug("is the scalar neworderID intialized
yet?\n $neworderID\nhow about statusCode
?\n $statusCode\n");

return %result;
}
EOS

It permissions are set to:
-rwxrwxrwx    1 root     root         2299 Jun 26
10:28 linkpt


When I restart interchange I get:
Bad GlobalSub 'linkpt'
In line 70 of the configuration file
'/usr/lib/interchange/eg/globalsub/linkpt':
GlobalSub <<EOS

Anyone see what I have done wrong?

Thank you for your time,
Richard Eicher II
www.texol.net


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/