public class PaymentGroupFormHandler extends PurchaseProcessFormHandler
The PaymentGroupFormHandler is used to associate PaymentGroups with the various
Order pieces. This component is used during the Order checkout process, and any
Order successfully processed by the PaymentGroupFormHandler is ready for the next
checkout phase, which may be confirmation.
The PaymentGroupFormHandler is composed of the following containers:
PaymentGroupMapContainer - container for the user's authorized PaymentGroups
CommerceIdentifierPaymentInfoContainer - container for the user's CommerceIdentifierPaymentInfo
objects for a particular Order's CommerceIdentifiers
There are 3 main handler methods in the PaymentGroupFormHandler, handleSplitPaymentInfos, handleApplyPaymentGroups and handleSpecifyDefaultPaymentGroup:
In order to conveniently manipulate PaymentGroups and CommerceIdentifierPaymentInfo Lists,
you can set the ListId and PaymentGroupId properties. This will
automatically expose the corresponding PaymentGroup and List in the CurrentList
and CurrentPaymentGroup properties.
GenericFormHandler,
PurchaseProcessFormHandler| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
static java.lang.String |
MSG_INVALID_PAYMENT_SPLIT_NUMBER |
static java.lang.String |
MSG_NO_DEFAULT_PAYMENT_GROUP |
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUEPARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDSSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
PaymentGroupFormHandler()
Creates a new
PaymentGroupFormHandler instance. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyCommerceIdentifierPaymentInfo(CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo,
Order order)
applyCommerceIdentifierPaymentInfo takes the supplied payment information and
update the Order. |
protected void |
applyDefaultPaymentGroup(Order pOrder)
applyDefaultPaymentGroup checks to see if there is a
defaultPaymentGroup. |
protected void |
applyPaymentGroups(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
applyPaymentGroups iterates over the supplied CommerceIdentifierPaymentInfos
for each of the CommerceIdentifiers. |
protected CommerceIdentifierPaymentInfo |
createSpecificPaymentInfo(CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo)
The
createSpecificPaymentInfo method takes a CommerceIdentifierPaymentInfo
and creates a new one whose subtype matches that of the original. |
java.lang.String |
getApplyPaymentGroupsErrorURL()
Return the ApplyPaymentGroupsErrorURL property.
|
java.lang.String |
getApplyPaymentGroupsSuccessURL()
Return the ApplyPaymentGroupsSuccessURL property.
|
java.util.List |
getCurrentList()
Return the CurrentList property.
|
PaymentGroup |
getCurrentPaymentGroup()
Return the CurrentPaymentGroup property.
|
java.lang.String |
getDefaultPaymentGroupName()
Return the DefaultPaymentGroupName property.
|
java.lang.String |
getListId()
Return the ListId property.
|
protected PaymentGroup |
getPaymentGroup(java.lang.String pPaymentMethod)
getPaymentGroup gets the PaymentGroup with the given name
from the PaymentGroupMapContainer. |
java.lang.String |
getPaymentGroupId()
Return the PaymentGroupId property.
|
java.lang.String |
getSpecifyDefaultPaymentGroupErrorURL()
Return the SpecifyDefaultPaymentGroupErrorURL property.
|
java.lang.String |
getSpecifyDefaultPaymentGroupSuccessURL()
Return the SpecifyDefaultPaymentGroupSuccessURL property.
|
java.lang.String |
getSplitPaymentInfosErrorURL()
Return the SplitPaymentInfosErrorURL property.
|
java.lang.String |
getSplitPaymentInfosSuccessURL()
Return the SplitPaymentInfosSuccessURL property.
|
java.lang.String |
getValidatePaymentGroupsChainId()
Return the ValidatePaymentGroupsChainId property.
|
boolean |
handleApplyPaymentGroups(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
handleApplyPaymentGroups is used when the user has supplied the
payment information for this order, and is ready to proceed with the next checkout phase. |
boolean |
handleSpecifyDefaultPaymentGroup(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
handleSpecifyDefaultPaymentGroup is used to let the user specify
a default PaymentGroup to use for payment. |
boolean |
handleSplitPaymentInfos(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
handleSplitPaymentInfos is used when the user is ready to
split a particular CommerceIdentifierPaymentInfo by amount. |
boolean |
isAllowPaymentGroupsWithZeroAmount()
This Flag is added to support backward compatibiity.
|
boolean |
isApplyDefaultPaymentGroup()
Return the ApplyDefaultPaymentGroup property.
|
protected boolean |
isPaymentGroupInOrder(Order pOrder,
java.lang.String pPaymentGroupId)
Deprecated.
This method is moved to PaymentGroupManager
|
void |
postApplyPaymentGroups(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
postApplyPaymentGroups is for work that must happen after
the PaymentGroups are applied to the Order. |
void |
postSpecifyDefaultPaymentGroup(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
postSpecifyDefaultPaymentGroup is for work that must happen after
the default PaymentGroup is set. |
void |
postSplitPaymentInfos(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
postSplitPaymentInfos is for work that must happen after
the CommerceIdentifierPaymentInfos are split. |
void |
preApplyPaymentGroups(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
preApplyPaymentGroups is for work that must happen before
the PaymentGroups are applied to the Order. |
void |
preSpecifyDefaultPaymentGroup(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
preSpecifyDefaultPaymentGroup is for work that must happen before
the default PaymentGroup is set. |
void |
preSplitPaymentInfos(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
preSplitPaymentInfos is for work that must happen before
the CommerceIdentifierPaymentInfos are split. |
protected void |
runProcessValidatePaymentGroups(Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
runProcessValidatePaymentGroups runs a configurable Pipeline chain
to validate PaymentGroups or to prepare for the next checkout phase. |
void |
setAllowPaymentGroupsWithZeroAmount(boolean pAllowPaymentGroupsWithZeroAmount)
This Flag is added to support backward compatibiity.
|
void |
setApplyDefaultPaymentGroup(boolean pApplyDefaultPaymentGroup)
Set the ApplyDefaultPaymentGroup property.
|
void |
setApplyPaymentGroupsErrorURL(java.lang.String pApplyPaymentGroupsErrorURL)
Set the ApplyPaymentGroupsErrorURL property.
|
void |
setApplyPaymentGroupsSuccessURL(java.lang.String pApplyPaymentGroupsSuccessURL)
Set the ApplyPaymentGroupsSuccessURL property.
|
void |
setCurrentList(java.util.List pCurrentList)
Set the CurrentList property.
|
void |
setCurrentPaymentGroup(PaymentGroup pCurrentPaymentGroup)
Set the CurrentPaymentGroup property.
|
void |
setDefaultPaymentGroupName(java.lang.String pDefaultPaymentGroupName)
Set the DefaultPaymentGroupName property.
|
void |
setListId(java.lang.String pListId)
Set the ListId property.
|
void |
setPaymentGroupId(java.lang.String pPaymentGroupId)
Set the PaymentGroupId property.
|
void |
setSpecifyDefaultPaymentGroupErrorURL(java.lang.String pSpecifyDefaultPaymentGroupErrorURL)
Set the SpecifyDefaultPaymentGroupErrorURL property.
|
void |
setSpecifyDefaultPaymentGroupSuccessURL(java.lang.String pSpecifyDefaultPaymentGroupSuccessURL)
Set the SpecifyDefaultPaymentGroupSuccessURL property.
|
void |
setSplitPaymentInfosErrorURL(java.lang.String pSplitPaymentInfosErrorURL)
Set the SplitPaymentInfosErrorURL property.
|
void |
setSplitPaymentInfosSuccessURL(java.lang.String pSplitPaymentInfosSuccessURL)
Set the SplitPaymentInfosSuccessURL property.
|
void |
setValidatePaymentGroupsChainId(java.lang.String pValidatePaymentGroupsChainId)
Set the ValidatePaymentGroupsChainId property.
|
protected void |
specifyDefaultPaymentGroup(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
specifyDefaultPaymentGroup sets the defaultPaymentGroupName in
the PaymentGroupMapContainer. |
protected void |
splitCommerceIdentifierPaymentInfo(CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
splitCommerceIdentifierPaymentInfo determines which CommerceIdentifierPaymentInfo
objects need to be split, and in what manner. |
protected void |
splitCommerceIdentifierPaymentInfoByAmount(CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo,
double pSplitAmount)
splitCommerceIdentifierPaymentInfoByAmount splits a CommerceIdentifierPaymentInfo
by amount. |
protected void |
splitPaymentInfos(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
splitPaymentInfos gets CommerceIdentifierPaymentInfos ready
for split. |
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, createRepriceParameterMap, defaultLocalLockManager, defaultUserProfile, doStartService, ensureTransaction, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getClaimableManager, getCommerceIdentifierPaymentInfoContainer, getCommerceItemManager, getCommerceItemShippingInfoContainer, getCommerceProfileTools, getCommercePropertyManager, getConfiguration, getCurrentTransaction, getDefaultLocale, getGiftlistManager, getHandlingInstructionManager, getLocalLockManager, getOrder, getOrderManager, getPaymentGroupManager, getPaymentGroupMapContainer, getPipelineManager, getPriceList, getPriceListId, getPriceListManager, getProfile, getProfileRepository, getPurchaseProcessHelper, getRepeatingRequestMonitor, getRepriceOrderChainId, getResourceBundle, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, getUserPricingModels, handlePipelineError, isConcurrentUpdate, isEnsureTransaction, isFormSubmission, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, releaseTransactionLock, runProcess, runProcess, runProcess, runProcessRepriceOrder, runProcessRepriceOrder, runRepricingProcess, setClaimableManager, setCommerceIdentifierPaymentInfoContainer, setCommerceItemManager, setCommerceItemShippingInfoContainer, setCommerceProfileTools, setCommercePropertyManager, setConfiguration, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGiftlistManager, setHandlingInstructionManager, setLocalLockManager, setOrder, setOrderManager, setPaymentGroupManager, setPaymentGroupMapContainer, setPipelineManager, setPriceListId, setPriceListManager, setProfile, setProfileRepository, setPurchaseProcessHelper, setRepeatingRequestMonitor, setRepriceOrderChainId, setSessionExpirationURL, setShippingGroupManager, setShippingGroupMapContainer, setShoppingCart, setTransactionCreated, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, setUserLocale, setUserPricingModels, transactionLockName, unsetTransactionCreatedaddFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwardsafterGet, beforeGetaddLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final java.lang.String MSG_NO_DEFAULT_PAYMENT_GROUP
public static final java.lang.String MSG_INVALID_PAYMENT_SPLIT_NUMBER
public PaymentGroupFormHandler()
PaymentGroupFormHandler instance.public boolean isAllowPaymentGroupsWithZeroAmount()
public void setAllowPaymentGroupsWithZeroAmount(boolean pAllowPaymentGroupsWithZeroAmount)
pAllowPaymentGroupsWithZeroAmount - The allowPaymentGroupsWithZeroAmount to set.public void setListId(java.lang.String pListId)
pListId - a String valuepublic java.lang.String getListId()
String valuepublic void setCurrentList(java.util.List pCurrentList)
pCurrentList - a List valuepublic java.util.List getCurrentList()
List valuepublic void setPaymentGroupId(java.lang.String pPaymentGroupId)
pPaymentGroupId - a String valuepublic java.lang.String getPaymentGroupId()
String valuepublic void setCurrentPaymentGroup(PaymentGroup pCurrentPaymentGroup)
pCurrentPaymentGroup - a PaymentGroup valuepublic PaymentGroup getCurrentPaymentGroup()
PaymentGroup valuepublic void setApplyPaymentGroupsSuccessURL(java.lang.String pApplyPaymentGroupsSuccessURL)
pApplyPaymentGroupsSuccessURL - a String valuepublic java.lang.String getApplyPaymentGroupsSuccessURL()
String valuepublic void setApplyPaymentGroupsErrorURL(java.lang.String pApplyPaymentGroupsErrorURL)
pApplyPaymentGroupsErrorURL - a String valuepublic java.lang.String getApplyPaymentGroupsErrorURL()
String valuepublic void setSplitPaymentInfosSuccessURL(java.lang.String pSplitPaymentInfosSuccessURL)
pSplitPaymentInfosSuccessURL - a String valuepublic java.lang.String getSplitPaymentInfosSuccessURL()
String valuepublic void setSplitPaymentInfosErrorURL(java.lang.String pSplitPaymentInfosErrorURL)
pSplitPaymentInfosErrorURL - a String valuepublic java.lang.String getSplitPaymentInfosErrorURL()
String valuepublic void setSpecifyDefaultPaymentGroupSuccessURL(java.lang.String pSpecifyDefaultPaymentGroupSuccessURL)
pSpecifyDefaultPaymentGroupSuccessURL - a String valuepublic java.lang.String getSpecifyDefaultPaymentGroupSuccessURL()
String valuepublic void setSpecifyDefaultPaymentGroupErrorURL(java.lang.String pSpecifyDefaultPaymentGroupErrorURL)
pSpecifyDefaultPaymentGroupErrorURL - a String valuepublic java.lang.String getSpecifyDefaultPaymentGroupErrorURL()
String valuepublic void setValidatePaymentGroupsChainId(java.lang.String pValidatePaymentGroupsChainId)
pValidatePaymentGroupsChainId - a String valuepublic java.lang.String getValidatePaymentGroupsChainId()
String valuepublic void setApplyDefaultPaymentGroup(boolean pApplyDefaultPaymentGroup)
pApplyDefaultPaymentGroup - a boolean valuepublic boolean isApplyDefaultPaymentGroup()
boolean valuepublic void setDefaultPaymentGroupName(java.lang.String pDefaultPaymentGroupName)
pDefaultPaymentGroupName - a String valuepublic java.lang.String getDefaultPaymentGroupName()
String valuepublic boolean handleSplitPaymentInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleSplitPaymentInfos is used when the user is ready to
split a particular CommerceIdentifierPaymentInfo by amount.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valueboolean valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void preSplitPaymentInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
preSplitPaymentInfos is for work that must happen before
the CommerceIdentifierPaymentInfos are split.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void postSplitPaymentInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
postSplitPaymentInfos is for work that must happen after
the CommerceIdentifierPaymentInfos are split.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occursprotected void splitPaymentInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
splitPaymentInfos gets CommerceIdentifierPaymentInfos ready
for split.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occursprotected void splitCommerceIdentifierPaymentInfo(CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
splitCommerceIdentifierPaymentInfo determines which CommerceIdentifierPaymentInfo
objects need to be split, and in what manner. This relies on the
CommerceIdentifierPaymentInfo.SplitAmount property.pCommerceIdentifierPaymentInfo - a CommerceIdentifierPaymentInfo valuepRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occursprotected void splitCommerceIdentifierPaymentInfoByAmount(CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo, double pSplitAmount)
splitCommerceIdentifierPaymentInfoByAmount splits a CommerceIdentifierPaymentInfo
by amount. This creates a new CommerceIdentifierPaymentInfo, adjusts properties of both
the original and the new object, and adds the new object to the
CommerceIdentifierPaymentInfoContainer.pCommerceIdentifierPaymentInfo - a CommerceIdentifierPaymentInfo valuepSplitAmount - a double valueprotected CommerceIdentifierPaymentInfo createSpecificPaymentInfo(CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo)
createSpecificPaymentInfo method takes a CommerceIdentifierPaymentInfo
and creates a new one whose subtype matches that of the original.pCommerceIdentifierPaymentInfo - a CommerceIdentifierPaymentInfo valueCommerceIdentifierPaymentInfo valuepublic boolean handleApplyPaymentGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleApplyPaymentGroups is used when the user has supplied the
payment information for this order, and is ready to proceed with the next checkout phase.
This applies the selected PaymentGroups to the various CommerceIdentifiers,
applies any defaultPaymentGroup to the Order amount remaining, runs the
appropriate validation processor, and updates the Order.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valueboolean valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void preApplyPaymentGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
preApplyPaymentGroups is for work that must happen before
the PaymentGroups are applied to the Order.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void postApplyPaymentGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
postApplyPaymentGroups is for work that must happen after
the PaymentGroups are applied to the Order.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occursprotected void applyPaymentGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
applyPaymentGroups iterates over the supplied CommerceIdentifierPaymentInfos
for each of the CommerceIdentifiers. Each CommerceIdentifierPaymentInfo is then used
to update the Order.
Once this is done, any defaultPaymentGroup is applied to the remaining
Order amount remaining.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occursprotected void applyCommerceIdentifierPaymentInfo(CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo, Order order)
applyCommerceIdentifierPaymentInfo takes the supplied payment information and
update the Order. This invokes business logic in the OrderManager that corresponds to the
RelationshipType property of the CommerceIdentifierPaymentInfo.pCommerceIdentifierPaymentInfo - a CommerceIdentifierPaymentInfo valueorder - an Order valueprotected void applyDefaultPaymentGroup(Order pOrder)
applyDefaultPaymentGroup checks to see if there is a
defaultPaymentGroup. If so, this PaymentGroup is added to the Order's
remaining amount.
This can facilitate simpler applications that only permit one
PaymentGroup per Order, as well as advanced applications that apply
a default PaymentGroup to any remaining Order amount not explicitly
covered by other PaymentGroups.pOrder - an Order valueprotected boolean isPaymentGroupInOrder(Order pOrder, java.lang.String pPaymentGroupId)
isPaymentGroupInOrder is used to determine if the PaymentGroup
is already in the Order.pOrder - an Order valuepPaymentGroupId - a String valueboolean valueprotected PaymentGroup getPaymentGroup(java.lang.String pPaymentMethod)
getPaymentGroup gets the PaymentGroup with the given name
from the PaymentGroupMapContainer.pPaymentMethod - a String valuePaymentGroup valueprotected void runProcessValidatePaymentGroups(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws RunProcessException
runProcessValidatePaymentGroups runs a configurable Pipeline chain
to validate PaymentGroups or to prepare for the next checkout phase.pOrder - an Order valuepPricingModels - a PricingModelHolder valuepLocale - a Locale valuepProfile - a RepositoryItem valuepExtraParameters - a Map valueRunProcessException - if an error occurspublic boolean handleSpecifyDefaultPaymentGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleSpecifyDefaultPaymentGroup is used to let the user specify
a default PaymentGroup to use for payment.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valueboolean valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void preSpecifyDefaultPaymentGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
preSpecifyDefaultPaymentGroup is for work that must happen before
the default PaymentGroup is set.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void postSpecifyDefaultPaymentGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
postSpecifyDefaultPaymentGroup is for work that must happen after
the default PaymentGroup is set.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occursprotected void specifyDefaultPaymentGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
specifyDefaultPaymentGroup sets the defaultPaymentGroupName in
the PaymentGroupMapContainer.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurs