com.konakart.bl.modules.payment
Class BasePaymentModule

java.lang.Object
  extended by com.konakart.bl.modules.BaseModule
      extended by com.konakart.bl.modules.payment.BasePaymentModule
Direct Known Subclasses:
Authorizenet, BarclaycardSmartPayApi, BarclaycardSmartPayHosted, Bluepay, Caledon, Chronopay, Cod, CyberSource, CyberSourceHOP, Elink, Epaybg, Eway_au, MoneyBookers, Netpayintl, PayflowPro, Payjunction, Paypal, Usaepay, Worldpay, WorldPayXMLRedirect, Yourpay

public class BasePaymentModule
extends BaseModule

Base class for Payment Modules.


Field Summary
protected  org.apache.commons.logging.Log log
          The Log instance for this application.
 
Fields inherited from class com.konakart.bl.modules.BaseModule
basePackage
 
Constructor Summary
BasePaymentModule()
           
 
Method Summary
protected  void addParameters(PaymentDetailsIf pd, java.util.List<NameValueIf> newParameters)
          Add more parameters to the PaymentDetails object.
protected  void checkZone(PaymentInfo info, int zone)
          Ensures that the zone is within one of the Geo Zones contained in the DeliveryInfo object.
protected  java.util.HashMap<java.lang.String,java.lang.String> hashParameters(PaymentDetailsIf pd, java.util.List<NameValueIf> ccParmList)
          This method is optionally called from the sub class to load up the parameters into a HashTable for efficient subsequent processing
protected  java.lang.String[] splitNameIntoFirstAndLastNames(java.lang.String name)
          Split the name into first name and surname using simple logic...
 
Methods inherited from class com.konakart.bl.modules.BaseModule
getBasketMgr, getCatMgr, getConfigMgr, getCurrMgr, getCustMgr, getEmailMgr, getEng, getLangMgr, getMultiStoreMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getPromMgr, getResourceBundle, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getTaxMgr, init, isAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
The Log instance for this application.

Constructor Detail

BasePaymentModule

public BasePaymentModule()
Method Detail

checkZone

protected void checkZone(PaymentInfo info,
                         int zone)
                  throws KKException
Ensures that the zone is within one of the Geo Zones contained in the DeliveryInfo object.

Parameters:
info -
zone -
Throws:
KKException

splitNameIntoFirstAndLastNames

protected java.lang.String[] splitNameIntoFirstAndLastNames(java.lang.String name)
Split the name into first name and surname using simple logic... The surname is assumed to be the last whitespace-separated item; everything before that is used as the first name.

Parameters:
name - the name as a String to convert.
Returns:
a String array where the first element is the first name and the second element is the surname.

hashParameters

protected java.util.HashMap<java.lang.String,java.lang.String> hashParameters(PaymentDetailsIf pd,
                                                                              java.util.List<NameValueIf> ccParmList)
This method is optionally called from the sub class to load up the parameters into a HashTable for efficient subsequent processing

Parameters:
pd - PaymentDetails object
ccParmList - name value pair list of CC parameters
Returns:
a hash map containing the parameters for rapid lookup

addParameters

protected void addParameters(PaymentDetailsIf pd,
                             java.util.List<NameValueIf> newParameters)
Add more parameters to the PaymentDetails object. Normally this method would be on the PaymentDetails class but it's placed here instead because of the automatic code generation that occurs on the PaymentDetails class for web services, JSON and RMI etc.

Parameters:
pd - the PaymentDetails object
newParameters - The parameters to set.


Copyright © 2011 DS Data Systems UK Ltd.