Hi All!
I have been trying to get the newest version of the
OpenSRS software (v2.45) working with Authorize.Net. I came across
modifications made by Ross Rader around July 2000 (http://www.byte.org/lib/perl/regmods/
). After running into some problems, I emailed Ross and he quickly
responded, letting me know that he hasn't been able to update to the newest
version, and that my best bet would be to poke around in the Dev List. So,
here I am :)
Has anyone successfully modified Ross' code to work
with the new system? Here's what I'm having problems with right now.
In the reg_system.cgi, there is the following block of code:
--
if ( $REG_SYSTEM{ F_CHARGE_CC } ) {
$cc_processor = $REG_SYSTEM{
CC_PROCESSOR };
if ( not $cc_processor or not
exists $CC_CONFIG{ $cc_processor } ) {
error_out( "Credit
card processor error" );
exit;
}
$cc_module = $CC_CONFIG{ $cc_processor
}{ module };
eval "require $cc_module";
if ( $@ ) {
error_out( "could
not load $cc_module" );
exit;
}
import $cc_module qw( auth capture
);
...
--
For some reason the second part of the second IF
statement (not exists $CC_CONFIG{ $cc_processor }) will not validate. In
my OpenSRS.conf, I have the following:
--
## Added to %REG_SYSTEM
CC_PROCESSOR =>
"AuthorizeNet", # CC
processor
F_USE_AVS => 1, # use AVS check or not AVS_ACCEPT => 'PAWXYZ', # accept these AVS codes DOMAIN_YR_PRICE => { new => 20.00, # USD for new domain/year transfer => 20.00, # USD for xfer domain/year }, And then added:
%CC_CONFIG = (
AuthorizeNet => { module => 'AuthorizeNet', host => 'secure.authorize.net', port => '443', script => '/gateway/transact.dll', login => 'MyLogin', # XXX insert your AuthorizeNet login here }, ); Can anyone see why those variables aren't getting
passed correctly? When I take out the second part of the IF statement, it
will go through and get stuck on trying to get the module. And just so you
know, I am using %CC_CONFIG at the top of my reg_system.cgi:
use vars
qw(
%in $cgi $path_templates %actions $action %CC_CONFIG %cc_types $XML_ Client %contact_keys %data %cc_mons @cc_types ); ( %in, $cgi, $path_templates, %actions, $action, %cc_mons, %CC_CONFIG, %cc_ types, $XML_Client, %contact_keys, %data ) = (); If anyone has any idea how to fix this, PLEASE let
me know. I've had a *very* long weekend reading through these mail lists,
documentations, and other forums.
Thanks,
Travis |