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

Custom payment module

Started by neil, October 10, 2007, 10:45:15 am

Previous topic - Next topic

neil

Hi all,

I want to add a custom payment module (for another java application) to konakart. The other application has soap/wsdl web services. I have found the source of the other payment modules, and my impression is that I need to adapt one of these to create a new module. I am looking for a rough outline of the steps should I take to implement the new module.

thanks in advance!
Neil

Brian

Hi Neil,

QuoteI have found the source of the other payment modules, and my impression is that I need to adapt one of these to create a new module.


Yes, well done, you are half-way there  :)


Here's a rough outline:

Since you will be calling a SOAP service you are best to use the style of gateway under com.konakart.actions.gateways.

Copy either Authorize.Net or USAePay as your starting points... inherit from BaseGatewayAction.

Your SOAP call will need to go in your implementation in com.konakart.actions.gateways

Also, you need to code your versions of either Authorize.Net or USAePay in com.konakart.bl.modules.payment.

Also, you need to code your versions of either Authorize.Net or USAePay in com.konakartadmin.modules.payment   (these are so that the module can be set up and configured using the KonaKart Admin App).

You have to add your gateway to the two properties files:  (or equivalents under Linux/Unix)

C:\Program Files\KonaKart\webapps\konakartadmin\WEB-INF\classes\konakartadmin.properties
and
C:\Program Files\KonaKart\webapps\konakart\WEB-INF\classes\konakart.properties

Add to this section:

# -----------------------------------------------------------------------------------
# Modules available to this konakart system
#
# You have to add the name for the module in the right property, separate these
# with ";".  You also have to supply the class in the appropriate location - and
# these classes must implement the appropriate KonakartModuleInterface interface....
# These are:
#     KonakartPaymentInterface    - payment modules
#     KonakartShippingInterface   - shipping modules
#     KonakartOrderTotalInterface - order total modules

konakart.modules.payment = Cod;IPayment;MoneyOrder;NoChex;PayPal;Pm2Checkout;PsiGate;SecPay;Authorizenet;Usaepay


Finally you should be able to use the Admin App to install and enable your gateway.

Good luck Neil,   I hope you find it easier than I may have made it sound  :)

Regards,
Brian