[ic] custom payment module

Gert van der Spoel gert at 3edge.com
Mon Aug 17 20:16:50 UTC 2009


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of Glenn McCalley
> Sent: Monday, August 17, 2009 7:55 PM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] custom payment module
> 
> ----- 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
> created:
> Payment/CDMI.pm which contains
> sub CDMI { hack of authorizenet.pm }
> and:
> 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
> "post_cdmi()"
> 
> 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.

Have you tried putting debug statements in Payment.pm to see if you can find
the place where things might be breaking before reaching the modules you
created?

CU,

Gert




More information about the interchange-users mailing list