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

Timothy Cassidy 6tc1@qlink.queensu.ca
Sat, 10 Mar 2001 20:44:01 -0500 (EST)

This is a stupid question, but how do you call one of these
GlobalSub subroutines (in your interchange.cfg file)?  I have been trying
to call these subroutines from within a section of my html pages like
[perl sub]

I also tried adding this line:
&charge=custom test
to my profiles.order file.

But regardless this fails with an error like this: vqMqdKVZ: - [10/March/2001:20:25:08 -0500]
construct /c
gi-bin/construct/aboutus.html Safe: Undefined subroutine &MVSAFE::test
called at
 (eval 240) line 6.
> test();

and there were no new errors in my /tmp/icdebug file

Thanks and thanks for putting up with my questions,

On Wed, 7 Mar 2001, Sam Hui wrote:

> Hi Larry,
> Here is a real simple GlobalSub for testing:
> GlobalSub <<EOS
> sub test {
> ::logDebug("Entering test GlobalSub");
> my %ic_result;
> $ic_result{MStatus}='success';
> $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
> -Sam
> -----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
> original
> 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
> not
> 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
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users