|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.order.purchase.PurchaseProcessHelper atg.projects.store.order.purchase.StorePurchaseProcessHelper atg.projects.store.order.purchase.StoreBillingProcessHelper
public class StoreBillingProcessHelper
Store implementation of the purchase process helper for billing sub-process.
Field Summary | |
---|---|
static java.lang.String |
AMOUNT_AUTHORIZED_PROP_NAME
|
static java.lang.String |
AMOUNT_REMAINING_PROP_NAME
|
static java.lang.String |
CLASS_VERSION
Class version string. |
static java.lang.String |
FIRSTNAME_PROP_NAME
|
static java.lang.String |
MIDDLENAME_PROP_NAME
|
protected static java.lang.String |
MSG_DUPLICATE_CC_NICKNAME
Duplicate CC nickname message key. |
protected static java.lang.String |
MSG_DUPLICATE_USER
Dublicate user message key. |
protected static java.lang.String |
MSG_EMAIL_IS_EMPTY
E-mail is empty message key. |
protected static java.lang.String |
MSG_MISSING_REQUIRED_ADDRESS_PROPERTY
Missing required address property. |
protected static java.lang.String |
MSG_NICKNAME_WRONG_LENGTH
Wrong nickname length message key. |
protected static java.lang.String |
MSG_PASSWORD_IS_EMPTY
Password is empty message key. |
protected static java.lang.String |
MSG_PASSWORD_WRONG_LENGTH
Password wrong length message key. |
protected static java.lang.String |
MSG_PASSWORDS_DONT_MATCH
Password don't match message key. |
protected static java.lang.String |
NEW_ADDRESS
New address constant. |
protected static java.lang.String |
NEW_CREDIT_CARD
New credit card constant. |
protected static java.lang.String |
ONLINE_CREDIT_INSUFFICIENT
Online credit insufficient. |
protected static java.lang.String |
SC_PAYMENT_GROUP_TYPE_NAME
Store Credit payment group type name. |
protected static java.lang.String |
STORE_CREDIT_ERROR
Store credit payment group error message key. |
protected static java.lang.String |
VERIFICATION_NUMBER_INVALID
Invalid verification number message key. |
Fields inherited from class atg.projects.store.order.purchase.StorePurchaseProcessHelper |
---|
MSG_MULTIPLE_COUPONS_PER_ORDER, MSG_UNCLAIMABLE_COUPON, PRICING_ERROR, PRICING_ERROR_ADDRESS |
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessHelper |
---|
ERROR_FETCHING_PROFILE, MSG_ERROR_ADDING_CREDIT_CARD, MSG_ERROR_ADDING_SHIPPINGGROUP, MSG_ERROR_ADDING_TO_ORDER, MSG_ERROR_CREATING_ORDER, MSG_ERROR_MOVING_ITEM_BETWEEN_SHIPPING_GROUPS, MSG_ERROR_PROCESS_ADD_ITEM_CHAIN, MSG_ERROR_REMOVING_ITEM, MSG_ERROR_REMOVING_ITEM_FROM_SHIPPING_GROUP, MSG_ERROR_REPRICING_ORDER_AFTER_ADD_ITEM, MSG_ERROR_SETTING_ORDER_AMOUNT, MSG_INVALID_PROFILE_ID |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
StoreBillingProcessHelper()
|
Method Summary | |
---|---|
protected void |
addBillingAddressToCard(atg.commerce.order.CreditCard pCard,
boolean pUsingStoredAddress,
java.lang.String pStoredAddressSelection,
atg.repository.RepositoryItem pProfile,
atg.commerce.order.Order pOrder)
This method checks to see if the user chose a profile address. |
void |
addCreditCardAuthorizationNumber(atg.commerce.order.Order pOrder,
java.lang.String pCreditCardVerificationNumber)
Add Credit Card Verification Number to the CreditCard Paymanet Group. |
void |
addCreditCardDetails(atg.commerce.order.CreditCard pCreditCard,
boolean pUsingStoredCreditCard,
java.lang.String pStoredCreditCardName,
atg.repository.RepositoryItem pProfile,
java.util.Locale pUserLocale)
Copy credit card from profile to order if paying with profile credit card. |
void |
addOrder(atg.commerce.order.Order pOrder)
Add the Order into the Repository if it is transient |
void |
addOrderAmountRemainingToCreditPaymentGroup(atg.commerce.order.Order pOrder)
Added Remaining Order Amount relationship To Credit Card PaymentGroup. |
protected void |
addUserToOptInList(atg.userprofiling.Profile pProfile,
java.lang.String pEmailOptInSourceCode)
Adds user to email opt-in list. |
protected void |
copyCreditCardFromProfile(atg.commerce.order.CreditCard pCreditCard,
java.lang.String pNickname,
atg.repository.RepositoryItem pProfile,
java.util.Locale pUserLocale)
Utility method to copy credit card from profile to order. |
CheckoutOptionSelections |
getCheckoutOptionSelections()
|
atg.commerce.order.CreditCard |
getCreditCard(atg.commerce.order.Order pOrder)
Utility method to fetch credit card and set properties from page. |
double |
getOrderRemaningAmount(atg.commerce.order.Order pOrder)
Get the remaining Amount from the order. |
atg.commerce.order.PaymentGroupManager |
getPaymentGroupManager()
Return the PaymentGroupManager property. |
protected java.util.ResourceBundle |
getResourceBundle()
Returns the error message ResourceBundle |
protected java.lang.String |
getResourceBundleName()
Returns the name of the error message ResourceBundle |
java.lang.String[] |
getStoreCreditIds(atg.repository.RepositoryItem pProfile)
This method returns store credits that for the given profile that can be used for the order. |
protected boolean |
initializePaymentGroups(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
java.lang.String[] pOnlineCreditIds)
Initializes the store credit payment method(s) based on the store credits the user chose. |
protected boolean |
isCreditCardEmpty(atg.commerce.order.CreditCard pCreditCard)
Deprecated. this method has been moved to CommerceProfileTools |
protected boolean |
isNewCreditCards(atg.commerce.order.Order pOrder)
|
protected boolean |
isPayingWithOnlineCredit(java.lang.String[] pOnlineCreditIds)
Checks to see if user is paying with a stored credit card. |
boolean |
isPaymentGroupOrderRelationShipExist(atg.commerce.order.PaymentGroup pPaymentGroup)
Verify, whether Order Relationship exist in the given Payment Group or not. |
boolean |
isValidNickNameLength(java.lang.String pNickName,
int pMinNickNameLength,
int pMaxNickNameLength)
Utility method to check if user's NickName meets the min & max length. |
protected void |
registerNewUserDuringCheckout(atg.commerce.order.Order pOrder,
atg.userprofiling.Profile pProfile,
java.util.Map pProfileValues)
This method will register a new user during checkout. |
protected void |
removeStoreCreditPaymentGroups(atg.commerce.order.Order pOrder)
Remove any store credit payment groups from order |
protected atg.service.pipeline.PipelineResult |
runProcessMoveToConfirmation(atg.commerce.order.Order pOrder,
atg.commerce.pricing.PricingModelHolder pPricingModels,
java.lang.String pMoveToConfirmationChainId,
java.util.Locale pLocale,
atg.repository.RepositoryItem pProfile,
java.util.Map pExtraParameters)
Run the pipeline which should be executed at the last of the billing process. |
void |
saveBillingAddressToProfile(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
java.lang.String pBillingAddressNickname)
This method saves the Billing Address to the profile. |
void |
saveCreditCardToProfile(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
java.lang.String pCreditCardNickName)
This method saves the credit card from the payment group to the profile. |
protected void |
saveDefaultBillingAddress(atg.repository.RepositoryItem pProfile,
atg.commerce.order.CreditCard pCreditCard)
Saves the address on the credit card to the user's default billing address. |
void |
saveShippingInfo(atg.repository.RepositoryItem pProfile,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
Saves all addresses in the shipping group container's shipping group map. |
void |
setCheckoutOptionSelections(CheckoutOptionSelections pCheckoutOptionSelections)
|
void |
setPaymentGroupManager(atg.commerce.order.PaymentGroupManager pPaymentGroupManager)
Set the PaymentGroupManager property. |
protected void |
setProfileEmailAndLogin(atg.repository.RepositoryItem pProfile,
java.lang.String pEmail)
Set the EmailId and LoginId into the profile repository |
protected void |
setProfilePassword(atg.repository.RepositoryItem pProfile,
java.lang.String pNewUserPassword)
Set the password and LoginId into the profile repository |
boolean |
setupCreditCardPaymentGroupsForOrder(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
boolean pUsingStoredCreditCard,
java.lang.String pStoredCreditCardName,
java.util.Locale pUserLocale)
Added remaining order amount to the payment group for given pStoredCreditCardName . |
void |
setupStoreCreditPaymentGroupsForOrder(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
java.lang.String[] pOnlineCreditIds)
Initialize Store Credit Payment Group, add amount to the payment group and add remaning amount to other payment groups CreditCard |
boolean |
validateCreditCardAuthorizationNumber(java.lang.String pCreditCardVerificationNumber)
Verify the Credit Card verification number |
boolean |
validateCreditCardNicknameInput(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
java.lang.String pCreditCardNickname,
int pMinNickNameLength,
int pMaxNickNameLength)
This method validates the credit card nickname if one is required. |
protected boolean |
validateEmailAddress(atg.repository.RepositoryItem pProfile,
java.lang.String pEmail)
Utility method to validate email address. |
protected boolean |
validatePassword(atg.repository.RepositoryItem pProfile,
java.lang.String pNewUserPassword,
java.lang.String pRetypeNewPassword)
Utility method to validate password input. |
protected double |
validateSufficientOnlineCredit(java.lang.String[] pOnlineCreditIds,
atg.commerce.order.Order pOrder)
This method verifies if the online credit(s) total is sufficient to cover the order total. |
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessHelper |
---|
addCreditCardToOrder, addItemsToOrder, addItemsToOrder, addShippingAddressToOrder, adjustItemRelationshipsForQuantityChange, adjustNonGiftHandlingInstructionsForQuantityDecrease, adjustNonGiftHandlingInstructionsForQuantityIncrease, applyValueDictionary, copyCreditCardInfo, createCommerceItem, createConfigurableSubitems, createOrder, decreaseRelationshipQuantity, deleteItems, deleteItems, getAddItemToOrderChainId, getAddItemToOrderPricingOp, getCommerceItemManager, getDefaultHardgoodShippingGroupType, getDeleteItemsFromOrderPricingOp, getGiftlistManager, getOrderManager, getPipelineManager, getRepriceOrderChainId, getShippingGroupForItem, getShippingGroupManager, getTransactionManager, increaseRelationshipQuantity, isAddItemToDefaultShippingGroup, isTransactionMarkedAsRollBack, moveItemBetweenShippingGroups, processPipelineErrors, removeEntireRelationshipQuantity, removeItemQuantityFromShippingGroup, runProcess, runProcess, runProcess, runProcessAddItemToOrder, runProcessRepriceOrder, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runRepricingProcess, setAddItemToDefaultShippingGroup, setAddItemToOrderChainId, setAddItemToOrderPricingOp, setCommerceItemManager, setCommerceItemProperties, setDefaultHardgoodShippingGroupType, setDeleteItemsFromOrderPricingOp, setGiftlistManager, setOrderAmountToPaymentGroup, setOrderManager, setPipelineManager, setRepriceOrderChainId, setShippingGroupManager, setTransactionManager |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected static final java.lang.String MSG_MISSING_REQUIRED_ADDRESS_PROPERTY
protected static final java.lang.String MSG_DUPLICATE_USER
protected static final java.lang.String MSG_EMAIL_IS_EMPTY
protected static final java.lang.String MSG_PASSWORDS_DONT_MATCH
protected static final java.lang.String MSG_PASSWORD_IS_EMPTY
protected static final java.lang.String MSG_PASSWORD_WRONG_LENGTH
protected static final java.lang.String MSG_NICKNAME_WRONG_LENGTH
protected static final java.lang.String MSG_DUPLICATE_CC_NICKNAME
protected static final java.lang.String SC_PAYMENT_GROUP_TYPE_NAME
protected static final java.lang.String ONLINE_CREDIT_INSUFFICIENT
protected static final java.lang.String STORE_CREDIT_ERROR
protected static final java.lang.String VERIFICATION_NUMBER_INVALID
protected static final java.lang.String NEW_ADDRESS
protected static final java.lang.String NEW_CREDIT_CARD
public static final java.lang.String MIDDLENAME_PROP_NAME
public static final java.lang.String FIRSTNAME_PROP_NAME
public static final java.lang.String AMOUNT_REMAINING_PROP_NAME
public static final java.lang.String AMOUNT_AUTHORIZED_PROP_NAME
Constructor Detail |
---|
public StoreBillingProcessHelper()
Method Detail |
---|
public void setPaymentGroupManager(atg.commerce.order.PaymentGroupManager pPaymentGroupManager)
pPaymentGroupManager
- a PaymentGroupManager
valuepublic atg.commerce.order.PaymentGroupManager getPaymentGroupManager()
PaymentGroupManager
valuepublic CheckoutOptionSelections getCheckoutOptionSelections()
public void setCheckoutOptionSelections(CheckoutOptionSelections pCheckoutOptionSelections)
pCheckoutOptionSelections
- the CheckoutOptionSelections component to set.protected java.util.ResourceBundle getResourceBundle()
protected java.lang.String getResourceBundleName()
protected boolean isPayingWithOnlineCredit(java.lang.String[] pOnlineCreditIds)
public void saveCreditCardToProfile(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String pCreditCardNickName)
pOrder
- pProfile
- pCreditCardNickName
- public void saveBillingAddressToProfile(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String pBillingAddressNickname)
pOrder
- pProfile
- pBillingAddressNickname
- protected void registerNewUserDuringCheckout(atg.commerce.order.Order pOrder, atg.userprofiling.Profile pProfile, java.util.Map pProfileValues) throws atg.commerce.CommerceException
pOrder
- pProfile
- pProfileValues
-
atg.commerce.CommerceException
protected void addUserToOptInList(atg.userprofiling.Profile pProfile, java.lang.String pEmailOptInSourceCode)
pProfile
- pEmailOptInSourceCode
- protected void saveDefaultBillingAddress(atg.repository.RepositoryItem pProfile, atg.commerce.order.CreditCard pCreditCard)
pProfile
- pCreditCard
- protected void addBillingAddressToCard(atg.commerce.order.CreditCard pCard, boolean pUsingStoredAddress, java.lang.String pStoredAddressSelection, atg.repository.RepositoryItem pProfile, atg.commerce.order.Order pOrder) throws atg.commerce.CommerceException
pCard
- pStoredAddressSelection
- pProfile
- pOrder
-
atg.commerce.CommerceException
protected void copyCreditCardFromProfile(atg.commerce.order.CreditCard pCreditCard, java.lang.String pNickname, atg.repository.RepositoryItem pProfile, java.util.Locale pUserLocale)
pCreditCard
- - Instance of Credit Card Payment GrouppNickname
- - nickname profile stored credit card nick namepProfile
- - Instance of Profile RepositorypUserLocale
- - Localeprotected double validateSufficientOnlineCredit(java.lang.String[] pOnlineCreditIds, atg.commerce.order.Order pOrder)
public double getOrderRemaningAmount(atg.commerce.order.Order pOrder) throws atg.commerce.CommerceException
atg.commerce.CommerceException
- if commerce error occursprotected boolean isNewCreditCards(atg.commerce.order.Order pOrder)
protected boolean isCreditCardEmpty(atg.commerce.order.CreditCard pCreditCard)
This behavior can be overriden by making additions to the String array creditCardProperties, or if necessary extending this method.
pCreditCard
- a value of type 'CreditCard'
protected void removeStoreCreditPaymentGroups(atg.commerce.order.Order pOrder)
pOrder
- public void setupStoreCreditPaymentGroupsForOrder(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String[] pOnlineCreditIds) throws atg.commerce.CommerceException, atg.repository.RepositoryException, java.io.IOException, javax.servlet.ServletException
pOrder
- pProfile
- pOnlineCreditIds
-
atg.commerce.CommerceException
- if an error occurs
atg.repository.RepositoryException
- if an error occurs
java.io.IOException
- if an error occurs
javax.servlet.ServletException
- if an error occursprotected boolean initializePaymentGroups(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String[] pOnlineCreditIds) throws atg.commerce.CommerceException, javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
- If servlet exception occurs
java.io.IOException
- If IO exception occurs
atg.commerce.CommerceException
public void addCreditCardAuthorizationNumber(atg.commerce.order.Order pOrder, java.lang.String pCreditCardVerificationNumber)
pOrder
- pCreditCardVerificationNumber
- public boolean validateCreditCardAuthorizationNumber(java.lang.String pCreditCardVerificationNumber)
pCreditCardVerificationNumber
-
public void addCreditCardDetails(atg.commerce.order.CreditCard pCreditCard, boolean pUsingStoredCreditCard, java.lang.String pStoredCreditCardName, atg.repository.RepositoryItem pProfile, java.util.Locale pUserLocale)
pCreditCard
- pStoredCreditCardName
- pProfile
- pUserLocale
- public atg.commerce.order.CreditCard getCreditCard(atg.commerce.order.Order pOrder)
public void addOrderAmountRemainingToCreditPaymentGroup(atg.commerce.order.Order pOrder) throws atg.commerce.CommerceException, atg.commerce.order.InvalidParameterException
pOrder
-
atg.commerce.CommerceException
atg.commerce.order.InvalidParameterException
public boolean setupCreditCardPaymentGroupsForOrder(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, boolean pUsingStoredCreditCard, java.lang.String pStoredCreditCardName, java.util.Locale pUserLocale) throws atg.commerce.CommerceException, atg.commerce.order.InvalidParameterException
pStoredCreditCardName
. If pStoredCreditCardName
is not empty, then copy credit card details from pProfile
to pOrder
pOrder
- orderpProfile
- user profilepStoredCreditCardName
- credit card nicknamepUserLocale
-
atg.commerce.CommerceException
atg.commerce.order.InvalidParameterException
protected atg.service.pipeline.PipelineResult runProcessMoveToConfirmation(atg.commerce.order.Order pOrder, atg.commerce.pricing.PricingModelHolder pPricingModels, java.lang.String pMoveToConfirmationChainId, java.util.Locale pLocale, atg.repository.RepositoryItem pProfile, java.util.Map pExtraParameters) throws atg.service.pipeline.RunProcessException
pOrder
- the order to repricepPricingModels
- the set of all pricing models for the user (item, order,
shipping, tax)pLocale
- the locale that the order should be priced withinpProfile
- the user who owns the orderpExtraParameters
- A Map of extra parameters to be used in the pricing
atg.service.pipeline.RunProcessException
- if error running pipeline processprotected void setProfileEmailAndLogin(atg.repository.RepositoryItem pProfile, java.lang.String pEmail)
pProfile
- pEmail
- public void addOrder(atg.commerce.order.Order pOrder)
pOrder
- protected void setProfilePassword(atg.repository.RepositoryItem pProfile, java.lang.String pNewUserPassword)
pProfile
- pNewUserPassword
- protected boolean validateEmailAddress(atg.repository.RepositoryItem pProfile, java.lang.String pEmail) throws StorePurchaseProcessException
StorePurchaseProcessException
protected boolean validatePassword(atg.repository.RepositoryItem pProfile, java.lang.String pNewUserPassword, java.lang.String pRetypeNewPassword) throws StorePurchaseProcessException
StorePurchaseProcessException
public boolean isValidNickNameLength(java.lang.String pNickName, int pMinNickNameLength, int pMaxNickNameLength)
pNickName
- is NickName string
public boolean validateCreditCardNicknameInput(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String pCreditCardNickname, int pMinNickNameLength, int pMaxNickNameLength) throws StorePurchaseProcessException
pOrder
- pProfile
- pCreditCardNickname
- pMinNickNameLength
- pMaxNickNameLength
-
StorePurchaseProcessException
public boolean isPaymentGroupOrderRelationShipExist(atg.commerce.order.PaymentGroup pPaymentGroup)
pPaymentGroup
-
public void saveShippingInfo(atg.repository.RepositoryItem pProfile, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
The key is used as the nick name. The shipping group's address is used for the address.
Also sets the default shipping method on the profile
public java.lang.String[] getStoreCreditIds(atg.repository.RepositoryItem pProfile)
pProfile
- profile repository item
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |