public class BasePaymentModule extends BaseModule
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log
The
Log instance for this application. |
basePackage, debugStackTraceExclusions
Constructor and Description |
---|
BasePaymentModule() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParameters(PaymentDetailsIf pd,
java.util.List<NameValueIf> newParameters)
Add more parameters to the PaymentDetails object.
|
protected void |
checkZone(PaymentInfo info,
int geoZoneId)
Ensures that the geoZoneId is within one of the Geo Zones contained in the PaymentInfo
object.
|
protected java.lang.String |
getCustomerSessionIdByCustomerId(int customerId)
Look up the sessionId for the specified customerId.
|
protected java.lang.String[] |
getFirstAndLastNamesFromAddress(int addrId)
Look up the first name and last name using the AddressId.
|
protected java.lang.String |
getIPAddress()
Return the IP address of the current machine
|
protected KKCriteria |
getNewCriteria(boolean allStores)
Gets a new KKCriteria object with the option of it being for all stores when in multi-store
single db mode.
|
PaymentDetails |
getPaymentDetailsCustom(java.lang.String sessionId,
NameValueIf[] parameters)
Method used to return any custom information required from the payment module.
|
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 boolean |
isGeoZoneMappedToCountry(int geoZoneId,
int countryId)
In some cases no zones may be defined for a country but a geo zone may be defined to map to
all zones of that country.
|
protected boolean |
isMultiStoreShareCustomers()
Returns true if we need to share customers in multi-store single db mode
|
protected java.lang.String[] |
splitNameIntoFirstAndLastNames(java.lang.String name)
Deprecated.
Replaced by a more robust solution where the address is looked up
splitStreetAddressIntoNumberAndStreet(String streetAddress) |
protected java.lang.String[] |
splitStreetAddressIntoNumberAndStreet(java.lang.String streetAddress)
Split the street address into house number and street using simple logic...
|
getBasketMgr, getCatMgr, getConfigMgr, getConfiguration, getConfigurationValue, getConfigurationValueAsBigDecimalWithDefault, getConfigurationValueAsBool, getConfigurationValueAsIntWithDefault, getCurrMgr, getCustMgr, getCustTagMgr, getDebugStackTraceExclusions, getEmailMgr, getEng, getLangMgr, getModuleClassName, getMultiStoreMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getPromMgr, getRandomText, getRandomText, getResourceBundle, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getTaxMgr, getZoneCodeForZoneName, init, isAvailable, isAvailable, isMultiStoreShareCustomersOrProducts, setDebugStackTraceExclusions, updateStaticVariablesNow
protected org.apache.commons.logging.Log log
Log
instance for this application.protected void checkZone(PaymentInfo info, int geoZoneId) throws com.konakart.app.KKException
info
- the infogeoZoneId
- the geoZoneIdcom.konakart.app.KKException
- an unexpected KKException exceptionprotected boolean isGeoZoneMappedToCountry(int geoZoneId, int countryId)
This method does a search in the zones_to_geo_zones table for any entries matching the geoZoneId, countryId and zoneId of 0 which is the id that is set when the mapping is for all zones of the country.
geoZoneId
- the geoZoneIdcountryId
- the countryIdprotected java.lang.String getCustomerSessionIdByCustomerId(int customerId)
customerId
- the customerIdprotected boolean isMultiStoreShareCustomers() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionprotected KKCriteria getNewCriteria(boolean allStores)
getNewCriteria
in class BaseModule
allStores
- the allStoresprotected java.lang.String[] getFirstAndLastNamesFromAddress(int addrId) throws java.lang.Exception
addrId
- the id of the address to look upjava.lang.Exception
- an unexpected exception@Deprecated protected java.lang.String[] splitNameIntoFirstAndLastNames(java.lang.String name)
splitStreetAddressIntoNumberAndStreet(String streetAddress)
name
- the name as a String to convert.protected java.lang.String[] splitStreetAddressIntoNumberAndStreet(java.lang.String streetAddress)
streetAddress
- the streetAddress as a String to convert.protected java.util.HashMap<java.lang.String,java.lang.String> hashParameters(PaymentDetailsIf pd, java.util.List<NameValueIf> ccParmList)
pd
- PaymentDetails objectccParmList
- name value pair list of CC parametersprotected void addParameters(PaymentDetailsIf pd, java.util.List<NameValueIf> newParameters)
pd
- the PaymentDetails objectnewParameters
- The parameters to set.protected java.lang.String getIPAddress() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected exception from the KonaKart enginepublic PaymentDetails getPaymentDetailsCustom(java.lang.String sessionId, NameValueIf[] parameters) throws java.lang.Exception
sessionId
- the sessionIdparameters
- the parametersjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.