[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] bad custom payment
I have a custom global sub to connect to Card
Services International. I can rm the global sub
stuff and run "perl linkpt" with out errors. I
have AllowGlobal construct and #include
globalsub/linkpt in interchange.cfg. I have set
payment up as "custom linkpt" in catalog.cfg.
When trying to place an order on construct I get
errors shown in red. But there is nothing in red.
Here is my construct error.log
216.111.193.92 UBu7BqGP:216.111.193.92 -
[17/July/2001:10:56:11 -0500] construct
/cgi-bin/construct/process.html bad custom
payment GlobalSub: linkpt
216.111.193.92 UBu7BqGP:216.111.193.92 -
[17/July/2001:10:56:12 -0500] construct
/cgi-bin/construct/process.html search error:
Limit subroutine creation: bad limit creation
code in coordinated search, probably search group
without search specification. at
//usr/lib/interchange/lib/Vend/Search.pm line
703.
>
Here is part of my profile.order:
*snip*
&set = mv_payment linkpt
[if value fax_order == 1]
&set = mv_payment Check or Money Order (will
call)
[elsif value fax_order == 2]
project_id=required Please include your PO number
&set = mv_payment Purchase order [value
project_id]
[value name=tmp_total set="[total-cost
noformat=1]" hide=1]
[perl tables="pricing products userdb"]
$CGI->{credit_limit_ok} = 1;
my $total = delete $Values->{tmp_total};
return unless $limit = tag_data('userdb',
'credit_limit', $Session->{username});
Log("credit_limit=$limit total=$total");
delete $CGI->{credit_limit_ok};
if($limit >= $total) {
$CGI->{credit_limit_ok} = 1;
}
return;
[/perl]
credit_limit_ok=mandatory Credit limit exceeded.
[/elsif]
[elsif value fax_order == 3]
&set = mv_payment COD
[value name=mv_handling set=cod hide=1]
[/elsif]
[elsif variable MV_PAYMENT_MODE]
&credit_card=standard keep
__CREDIT_CARDS_ACCEPTED__
&charge=custom linkpt '[value
mv_credit_card_number]' '[value
mv_credit_card_exp_month]'
'[value mv_credit_card_exp_year]' '[value fname]'
'[value lname]' '[value email]'
'[value phone_day]' '[value address1]' '[value
address2]' '[value city]' '[value state]'
'[value zip]' '[value country]' '[salestax
noformat=1]' '[shipping noformat=1]'
'[subtotal noformat=1]' '[total-cost noformat=1]'
'[value b_address1]' '[value b_address
2]'
'[value b_city]' '[value b_state]' '[value
b_zip]' '[value b_country]'
&set=mv_payment Real-time ([var MV_PAYMENT_MODE])
Credit Card
&success=successful
[/elsif]
[elsif config CyberCash]
&fail=../special_pages/failed
&charge=[var CYBER_MODE]
[/elsif]
[elsif config CreditCardAuto]
mv_credit_card_valid=required Credit card fails
tests.
&set=mv_payment Credit Card (%c)
[/elsif]
*snip*
Here is my linkpt globalsub:
GlobalSub <<EOF
sub linkpt {
use lperl;
#use LPERL 'CapturePayment';
$lperl = new
LPERL("/usr/lib/interchange/eg/LPERL/lbin","FILE","/usr/lib/interchange/eg/LPERL/temp/")
;
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;}
$Vend::Session->{cybercash_result} =
$Vend::Session->{payment_result} = \%result;
delete $Vend::Session->{cybercash_error};
delete $Vend::Session->{payment_error};
if ($decline) {
$decline = $decline >> 8;
$result{'pop.status'} =
$result{'MStatus'} = 'failed';
$Vend::Session->{cybercash_error} =
$Vend::Session->{payment_error} =
$result{RESPMSG};
}
else {
$result{'pop.status'} =
$result{'MStatus'} = 'success';
$Vend::Session->{payment_id} =
$result{'pop.order-id'};
$Vend::Session->{cybercash_error} =
$Vend::Session->{payment_error} =
$result{RESPMSG};
: }
else {
$result{'pop.status'} =
$result{'MStatus'} = 'success';
$Vend::Session->{payment_id} =
$result{'pop.order-id'};
$Vend::Session->{cybercash_error} =
$Vend::Session->{payment_error} =
$result{RESPMSG};
}
#::logDebug(qq{signio decline=$decline result: }
. ::uneval( \%result));
return %result;
}
EOF
Warning formating is bad from the email.
So what stupid thing have I done now?
Thank you for you time,
Rick Eicher II
www.texol.net
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/