KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: routsounmanman on April 01, 2008, 02:56:36 pm

Title: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 02:56:36 pm
Hi there!

This is my first post here, you're free to welcome me to these forums  ::)

Anyways, I've been asked to implement a credit card payment module in 6 different konakart shops. I've done this before in Oscommerce and PHP yet this is my first time with Konakart although I've programmed in Java before. Please help me get started ...
Title: Re: Adding a Credit Card Payment module
Post by: julie on April 01, 2008, 03:08:59 pm
You're very welcome indeed  :-*

The best thing for you to do is to follow this mini tutorial : http://www.konakart.com/customizationfaq.php#How_do_I_create_a_new_payment_module_

Are the shops all in Greece ? When you've finished the payment module you'll be even more welcome if you decide to donate it to the community  ;)

Good luck,

Julie
Title: Re: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 03:35:35 pm
Thanx for the link, everything is so well documented! Of course I'll contribute my module to the community after it is functioning properly.

Many thanks again!
Title: Re: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 05:56:18 pm
Hey, I've tried to create a new payment module but I don't see it in the Admin section.

I've followed the instructions, and added the class name at webapps/konakartadmin/WEB-INF/classes/konakartadmin.properties yet I see no difference. I've deleted some of the modules there like PayJunction and I see no difference either! Any idea?
Title: Re: Adding a Credit Card Payment module
Post by: kate on April 01, 2008, 06:24:16 pm
Hi,

You did restart tomcat didn't you?

Regards,
Kate
Title: Re: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 07:13:46 pm
At first no, but then I figured it out.

But still, it doesn't work. I've found all java files mentioned and changed averything "PayJunction" to "EuroPay", "PAYJUNCTION" to "EUROPAY", etc using Netbeans and Replace.
Title: Re: Adding a Credit Card Payment module
Post by: kate on April 01, 2008, 07:33:00 pm
Hi,

You have to code accurately and get all your cases correct (upper and lower cases correct).

Check and double check the names of the classes you have defined and are building and study the exception messages carefully. 

Remember that the default installation has several examples and all the code is provided for these so you have plenty of examples to reference to compare against your new modules.

Kate
Title: Re: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 07:58:43 pm
I've done everything the tutorial says up until "Add the KonaPay gateway to the Admin App" and then restarted Tomcat. i should be seeing the new payment module from within Admin, right?
Title: Re: Adding a Credit Card Payment module
Post by: kate on April 01, 2008, 08:01:31 pm
yes you should - but it's impossible for me to tell you what you've done wrong...   do you get an exception?

Kate
Title: Re: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 08:09:50 pm
No I don't get any exceptions whatsoever, the module just doesn't show up. Okay let me show you the files I've made changes to. Maybe I'm forgetting something.

KonaKart\custom\modules\src\com\konakart\actions\gateways\EuropayAction.java
KonaKart\custom\modules\src\com\konakart\bl\modules\payment\europay\Europay.java
KonaKart\custom\modules\src\com\konakart\bl\modules\payment\europay\Europay_de.properties
KonaKart\custom\modules\src\com\konakart\bl\modules\payment\europay\Europay_en.properties
KonaKart\custom\modules\src\com\konakart\bl\modules\payment\europay\Europay_es.properties
KonaKart\custom\modules\src\com\konakartadmin\modules\payment\europay\Europay.properties
KonaKart\custom\modules\src\com\konakartadmin\modules\payment\europay\Europay.java
Title: Re: Adding a Credit Card Payment module
Post by: kate on April 01, 2008, 08:22:49 pm
Have you followed the instructions in the FAQ where you tells you about modifying:

webapps/konakartadmin/WEB-INF/classes/konakartadmin.properties.

?
Title: Re: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 08:28:09 pm
Oh yeah, sorry. That too.

I've added "Europay" to the list of payment modules
Title: Re: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 08:47:14 pm
Just checked and I saw an exception I hadn't seen before, sorry. It says " Class Not Found Exception "

But I'm pretty sure all classes are defined as " Europay "... I'll look into it some more... Thanks for your patience.
Title: Re: Adding a Credit Card Payment module
Post by: routsounmanman on April 01, 2008, 09:14:50 pm
OK we're getting somewhere... I obviously hadn't compiled the java files. So, I go into command-promt and execute: ant
I get the following output :

Buildfile : build.xml file does not exist!

Build failed!
Title: Re: Adding a Credit Card Payment module
Post by: mtoon on April 07, 2008, 05:46:36 pm
did you run the ant.bat file from the bin directory?  If so, you have to run it from the parent folder custom. 
1) Open a command prompt
2) change your directory to the konakart\custom directory
3) Run "bin\ant"

That should create everything.