[ic] custom payments - very bad GlobalSub problem (?)

Sam Hui shui@lunamedium.com
Wed, 7 Mar 2001 18:58:48 -0800

Hi Larry,

Here is a real simple GlobalSub for testing:

GlobalSub <<EOS
sub test {

::logDebug("Entering test GlobalSub");

my %ic_result;
$ic_result{'order-id'}=1; #cannot be null

::logDebug("Exiting test GlobalSub");
return (%ic_result);

Those $ic_result hashes are required values for a successful credit charge.
Uncomment the Debug variable in your interchange config if you haven't
already done so.
You'll see the debug messages in /tmp/icdebug (the default).
Also make sure you have this in your profiles.order:

&charge=custom test


-----Original Message-----
Date: Wed, 7 Mar 2001 15:24:04 -0800 (PST)
From: Larry Morley <lmorley@flexihost.com>
To: <interchange-users@lists.akopia.com>
Subject: [ic] custom payments - very bad GlobalSub problem (?)
Reply-To: interchange-users@lists.akopia.com

Hi -

Hopefully someone can help me out here; I really need it...
I can't get the GlobalSub for authorizenet, signio, etc. working.  I
created a simple script and put it in my /usr/lib/interchange/eg/globalsub
directory (that's the directory created by the RPM install and makecat).

I need to get Interchange to interface to a variety of different systems.
Unfortunately right now I cant get custom payment processing to talk
to anything at all...

I don't actually know if the globalsub in question is getting found and
executed.  The error in the error.log file simply says:

... construct /cgi-bin/construct/process.html bad custom payment
GlobalSub: authorizenet

The script compiles fine with the GlobalSub, etc. tags removed (when I
turn it into a regular Perl script for a minute).  I've replaced the
authorizenet script with everything I can think of including a simple
script that shouldn't do anything more than create a file.  Even that
doesn't work (no file is created, and the same error as above ends up
in error.log).

I've stripped this thing down to the point where its as lean as it can be.
My /etc/interchange.cfg has an #include pointing to it; I've tried putting
the #include in different parts of the file (no luck).  At this point I'm
certain the thing is actually getting found and executed by Interchange.

Been through the mailing list archives, and tried everything that looked
applicable...  Can someone help me out?  It's Interchange 4.6.3-1 (RPM
install) on RedHat 6.2.

I'd like to have a very simple GlobalSub that does nothing more than
echo whatever's passed to it (for order info) by GlobalSub.  I thought I'd
written one.  But ...  Also, does anyone know where there are docs on
these gizmos?  Especially the custom payment routine ones?

Thanks in advance,
Larry Morley