KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: Burz on January 25, 2008, 06:27:45 am

Title: Trying to compile custom payment module
Post by: Burz on January 25, 2008, 06:27:45 am
In Kona 2.2.0.6 I'm trying to compile a Check/Money Order payment module 'Checkmo.java' which is adapted from a copy of Cod.java, but I am getting an error "PaymentDetails.CHECKMO cannot be resolved".

Seems that 'PaymentDetails' class has a constant 'COD' of type integer. I guess what I need to know is whether I am stuck using 'COD' for my module? And if so, how will we tell the difference between orders paid by COD and those paid by Check?
Title: Re: Trying to compile custom payment module
Post by: pete on January 25, 2008, 08:33:58 am
Hi Burz,

The supported payment types are :


This information is only really used in com.konakart.actions.CheckoutConfirmationSubmitAction to decide what action to take during a checkout. What you could do is to use your own constant with an unused value. We use 1,2,3 and the next one will be 4 so I'd pick a number that won't clash now or in the future (i.e. 100). This should enable you to distinguish between COD and CHECK.

-Pete


Title: Re: Trying to compile custom payment module
Post by: Burz on January 25, 2008, 05:18:34 pm
Thanks for the clarification Pete...

I went ahead and used .COD, and the desired payment description still gets recorded in the orders table and shows up on invoices. That's as good as I need. :)