public class PaymentMgr extends BaseMgr implements PaymentMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
PaymentMgr.SortOrderComparator |
protected class |
PaymentMgr.StaticData
Used to store the static data of this manager
|
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
MODULE_PAYMENT_INSTALLED |
protected static java.lang.String |
mutex |
protected static java.util.Map<java.lang.String,PaymentMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
templateBaseDir
Constructor and Description |
---|
PaymentMgr(KKEngIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCurrencyToOrder(Order order)
Ensure that the order has the currency object instantiated.
|
protected java.lang.String |
getJavaModuleName(java.lang.String moduleName)
Whatever the module name is, the package name is the module name in lowercase and the class
name starts with an upper case character
|
PaymentDetails |
getPaymentDetails(java.lang.String sessionId,
java.lang.String moduleCode,
int orderId,
java.lang.String hostAndPort,
int languageId)
This method is called once a payment gateway has been selected and an order has been saved in
the database.
|
PaymentDetails |
getPaymentDetailsCustom(java.lang.String sessionId,
java.lang.String moduleCode,
NameValueIf[] parameters)
Method used to return any custom information required from the payment module.
|
PaymentDetails |
getPaymentDetailsPerOrder(java.lang.String sessionId,
java.lang.String moduleCode,
OrderIf order,
java.lang.String hostAndPort,
int languageId)
This method is called once a payment gateway has been selected even if the order has not been
saved in the database.
|
PaymentDetails |
getPaymentGateway(OrderIf order,
java.lang.String moduleName,
int languageId)
Return the PaymentDetail object for one payment gateway.
|
PaymentDetails[] |
getPaymentGateways(OrderIf order,
int languageId)
Each payment module is called and asked to return a PaymentDetails object.
|
protected PaymentDetails[] |
getPaymentGatewaysPrivate(OrderIf order,
java.lang.String moduleName,
int languageId) |
protected PaymentInfo |
getPaymentInfo(Order order,
int languageId)
Returns a partially filled payment info object
|
protected PaymentInterface |
getPaymentModuleForName(java.lang.String moduleName)
Called to instantiate a payment module.
|
protected boolean |
isEnhancedVariantHandlingModeEnabled() |
protected boolean |
isOnlyBraintree(OrderProductIf[] products)
Check if only braintree payment method is accepted.
|
void |
refreshConfigs()
Refreshes the configuration data for this manager
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,PaymentMgr.StaticData> staticDataHM
protected static final java.lang.String MODULE_PAYMENT_INSTALLED
public PaymentMgr(KKEngIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic void refreshConfigs() throws java.lang.Exception
PaymentMgrIf
refreshConfigs
in interface PaymentMgrIf
java.lang.Exception
- an unexpected exceptionprotected java.lang.String getJavaModuleName(java.lang.String moduleName)
moduleName
- the moduleNamepublic PaymentDetails[] getPaymentGateways(OrderIf order, int languageId) throws java.lang.Exception
getPaymentGateways
in interface PaymentMgrIf
order
- the orderlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic PaymentDetails getPaymentGateway(OrderIf order, java.lang.String moduleName, int languageId) throws java.lang.Exception
getPaymentGateway
in interface PaymentMgrIf
order
- the ordermoduleName
- can be module name on its own or it can be "moduleName~~moduleSubCode" if the
module has a subCodelanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected PaymentDetails[] getPaymentGatewaysPrivate(OrderIf order, java.lang.String moduleName, int languageId) throws java.lang.Exception
order
- the ordermoduleName
- the moduleNamelanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic PaymentDetails getPaymentDetails(java.lang.String sessionId, java.lang.String moduleCode, int orderId, java.lang.String hostAndPort, int languageId) throws java.lang.Exception
The module matching the module code is called in order to get a fully populated PaymentDetails object containing all of the required parameters etc. for the payment gateway.
getPaymentDetails
in interface PaymentMgrIf
sessionId
- the sessionIdmoduleCode
- the moduleCodeorderId
- the orderIdhostAndPort
- the hostAndPortlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic PaymentDetails getPaymentDetailsPerOrder(java.lang.String sessionId, java.lang.String moduleCode, OrderIf order, java.lang.String hostAndPort, int languageId) throws java.lang.Exception
The module matching the module code is called in order to get a fully populated PaymentDetails object containing all of the required parameters etc. for the payment gateway.
getPaymentDetailsPerOrder
in interface PaymentMgrIf
sessionId
- the sessionIdmoduleCode
- the moduleCodeorder
- the orderhostAndPort
- the hostAndPortlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic PaymentDetails getPaymentDetailsCustom(java.lang.String sessionId, java.lang.String moduleCode, NameValueIf[] parameters) throws java.lang.Exception
getPaymentDetailsCustom
in interface PaymentMgrIf
sessionId
- the sessionIdmoduleCode
- the moduleCodeparameters
- the parametersjava.lang.Exception
- an unexpected exceptionprotected PaymentInfo getPaymentInfo(Order order, int languageId) throws java.lang.Exception
order
- the orderlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected void addCurrencyToOrder(Order order) throws java.lang.Exception
order
- the orderjava.lang.Exception
- an unexpected exceptionprotected PaymentInterface getPaymentModuleForName(java.lang.String moduleName) throws java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
moduleName
- the moduleNamejava.lang.IllegalArgumentException
- an unexpected IllegalArgumentException exceptionjava.lang.InstantiationException
- an unexpected InstantiationException exceptionjava.lang.IllegalAccessException
- an unexpected IllegalAccessException exceptionjava.lang.reflect.InvocationTargetException
- an unexpected InvocationTargetException exceptionjava.lang.ClassNotFoundException
- an unexpected ClassNotFoundException exceptionprotected boolean isOnlyBraintree(OrderProductIf[] products) throws com.konakart.app.KKException
products
- the array of order productscom.konakart.app.KKException
- an unexpected KKException exceptionprotected boolean isEnhancedVariantHandlingModeEnabled() throws java.lang.Exception
java.lang.Exception
Copyright © 2018 DS Data Systems UK Ltd.