[ic] custom payment module

Glenn McCalley glenn at bnetmd.net
Mon Aug 17 16:54:58 UTC 2009

----- Original Message ----- 
From: "Gert van der Spoel" <gert at 3edge.com>
To: <interchange-users at icdevgroup.org>
Sent: Monday, August 10, 2009 3:33 PM
Subject: Re: [ic] custom payment module

>> SO!
>> How do you turn this into a payment module?  I've perused the
>> Payment.pm and Payment module directory and am having trouble seeing how 
>> they
>> interact, how it gets called, where the "OK" or "refused" is returned to 
>> the checkout
>> process, etc.  It looks like things get mapped/translated into things 
>> which get mapped/translated into other things where they get mapped once 
>> again, and somehow somewhere an "OK" signal is returned.  Is there a 
>> HowTo or a reference on this somewhere?
> The HowTo I did:
> - copy one of the existing payment modules
> - bash it , smack it, whack it, tweak it, until it says 'transaction OK' 
> and
> the (pre) authorization ended up in the banks cc transaction backoffice 
> ...
> there is where then the OwnPaymentModule.pm  comes to play ...
> Perhaps a simple approach could be to set up OwnPaymentModule.pm and at 
> the
> point where it has 'post_data()' you just call that existing Perl script,
> retrieve the response from that script and set the 
> MStatus/MErrMsg/order-id
> Anyway good luck and let us know how you have sorted it in the end!
> CU,
> Gert

OK, decided to try your suggestion to replace the "post_data()" routine with 
the perl program that can already talk with the payment processor, so I've 
Payment/CDMI.pm which contains
sub CDMI { hack of authorizenet.pm }
Payment/post_cdmi.pm which contains
sub post_cdmi { perl to/from payment processor }

CDMI contains the "post_data()" statement you mentioned which is now 

I had to manually edit variable.txt for
MV_Payment_Mode   CDMI    Payment
...as CDMI did not show up as a payment mode in the UI.

Processing checkout returns an error as I would expect,
(Payment process): There was an error accepting payment: Real-time charge 
failed. Reason: No account id
Credit Card Information: No account id

Both my modules contain debug statements such as:
::logDebug("CDMI CDMI start");
::logDebug("CDMI post_cdmi start");
and these are not showing up in the debug/error logs.  That would seem to 
indicate that the new payment module is not running at all?  Now do I get it 
to run?  When I restart IC I see the successful "Require" messages so IC is 
finding them but does not seem to recognize the payment mode.

THank you for suggestions,
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users

More information about the interchange-users mailing list