• Welcome to KonaKart Community Forum. Please login or sign up.
 

Trying to compile custom payment module

Started by Burz, January 25, 2008, 06:27:45 am

Previous topic - Next topic

Burz

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?

pete

Hi Burz,

The supported payment types are :

  • com.konakart.app.PaymentDetails.COD - Cash on delivery

  • com.konakart.app.PaymentDetails.BROWSER_PAYMENT_GATEWAY - Payment gateway where user is redirected to gateway server to enter credit card details e.g. chronopay, worldpay

  • com.konakart.app.PaymentDetails.SERVER_PAYMENT_GATEWAY - Payment gateway where credit card details are collected on a KonaKart web page and sent server to server to the payment gateway. e.g. authorizenet, usaepay



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



Burz

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. :)