public class StoreBillingProcessHelper extends StorePurchaseProcessHelper
| Modifier and Type | Field and Description |
|---|---|
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.
|
protected static java.lang.String |
MSG_DUPLICATE_CC_NICKNAME
Duplicate CC nickname 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 |
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.
|
ADDRESS_PROP_NAME, CITY_PROP_NAME, COUNTRY_PROP_NAME, FIRST_NAME_PROP_NAME, LAST_NAME_PROP_NAME, MSG_MULTIPLE_COUPONS_PER_ORDER, MSG_UNCLAIMABLE_COUPON, POSTAL_CODE_PROP_NAME, PRICING_ERROR, PRICING_ERROR_ADDRESS, STATE_PROP_NAMEERROR_FETCHING_PROFILE, MSG_ERROR_ADDING_CREDIT_CARD, MSG_ERROR_ADDING_SHIPPINGGROUP, MSG_ERROR_ADDING_TO_ORDER, MSG_ERROR_CHANGING_ITEM_QUANTITY, 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| Constructor and Description |
|---|
StoreBillingProcessHelper() |
| Modifier and Type | Method and Description |
|---|---|
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 Payment 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 |
addOrderAmountRemainingToCreditPaymentGroup(atg.commerce.order.Order pOrder)
Added Remaining Order Amount relationship To Credit Card PaymentGroup.
|
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.
|
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() |
protected java.lang.String |
getResourceBundleName() |
atg.commerce.order.purchase.ShippingGroupContainerService |
getShippingGroupContainerService() |
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 exists 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 minimum and maximum length.
|
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.
|
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 |
setPaymentGroupManager(atg.commerce.order.PaymentGroupManager pPaymentGroupManager)
Set the PaymentGroupManager property.
|
void |
setShippingGroupContainerService(atg.commerce.order.purchase.ShippingGroupContainerService pShippingGroupContainerService) |
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 remainng 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 |
validateCreditCardRequiredFields(atg.commerce.order.CreditCard card,
java.lang.String pVerificationNumber,
java.lang.String pNickname)
Check required fields for the new credit card.
|
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.
|
checkForRequiredAddressProperties, claimCoupon, claimCoupon, getAddressPropertyNameMap, getClaimableManager, getMandatoryStateCountryList, getPlaceUtils, getPricingTools, getRequiredAddressPropertyNames, getStoreConfiguration, getStoreOrderTools, removeCoupon, removeCoupon, repriceOrder, setAddressPropertyNameMap, setClaimableManager, setPlaceUtils, setPricingTools, setRequiredAddressPropertyNames, setStoreConfiguration, setStoreOrderTools, tenderCouponaddCreditCardToOrder, addItemsToOrder, addItemsToOrder, addItemToOrder, addItemToShippingGroup, addShippingAddressToOrder, adjustItemRelationshipsForQuantityChange, adjustNonGiftHandlingInstructionsForQuantityDecrease, adjustNonGiftHandlingInstructionsForQuantityIncrease, applyValueDictionary, changeItemQuantity, copyCreditCardInfo, createCommerceItem, createConfigurableSubitems, createOrder, decreaseRelationshipQuantity, deleteItem, deleteItems, deleteItems, getAddItemToOrderChainId, getAddItemToOrderPricingOp, getCommerceItemManager, getDefaultHardgoodShippingGroupType, getDeleteItemsFromOrderPricingOp, getFirstShippingGroup, getGiftlistManager, getOrderManager, getPipelineManager, getRepriceOrderChainId, getShippingGroupForItem, getShippingGroupManager, getTransactionManager, increaseRelationshipQuantity, isAddItemToDefaultShippingGroup, isTransactionMarkedAsRollBack, moveItemBetweenShippingGroups, postAddItemsToOrder, postDeleteItem, postDeleteItem, processGiftAddition, processPipelineErrors, removeEntireRelationshipQuantity, removeItemQuantityFromShippingGroup, runProcess, runProcess, runProcess, runProcessAddItemToOrder, runProcessRepriceOrder, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runRepricingProcess, setAddItemToDefaultShippingGroup, setAddItemToOrderChainId, setAddItemToOrderPricingOp, setCommerceItemManager, setCommerceItemProperties, setDefaultHardgoodShippingGroupType, setDeleteItemsFromOrderPricingOp, setGiftlistManager, setOrderAmountToPaymentGroup, setOrderManager, setPipelineManager, setRepriceOrderChainId, setShippingGroupManager, setTransactionManageraddLogListener, createAdminServlet, doStartService, 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 final java.lang.String CLASS_VERSION
protected static final java.lang.String MSG_MISSING_REQUIRED_ADDRESS_PROPERTY
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 AMOUNT_REMAINING_PROP_NAME
public static final java.lang.String AMOUNT_AUTHORIZED_PROP_NAME
public void setPaymentGroupManager(atg.commerce.order.PaymentGroupManager pPaymentGroupManager)
pPaymentGroupManager - a PaymentGroupManager value.public atg.commerce.order.PaymentGroupManager getPaymentGroupManager()
PaymentGroupManager value.public void setShippingGroupContainerService(atg.commerce.order.purchase.ShippingGroupContainerService pShippingGroupContainerService)
pShippingGroupContainerService - A new ShippingGroupContainerService.public atg.commerce.order.purchase.ShippingGroupContainerService getShippingGroupContainerService()
protected java.util.ResourceBundle getResourceBundle()
protected java.lang.String getResourceBundleName()
protected boolean isPayingWithOnlineCredit(java.lang.String[] pOnlineCreditIds)
pOnlineCreditIds - the online credit cards ids.public void saveCreditCardToProfile(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
java.lang.String pCreditCardNickName)
pOrder - the order.pProfile - the profile.pCreditCardNickName - the credit card nick name.public void saveBillingAddressToProfile(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
java.lang.String pBillingAddressNickname)
pOrder - the order.pProfile - the profile.pBillingAddressNickname - the billing address nickname.public void saveDefaultBillingAddress(atg.repository.RepositoryItem pProfile,
atg.commerce.order.CreditCard pCreditCard)
pProfile - the profile.pCreditCard - the credit card.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 - the card.pStoredAddressSelection - the stored address selection.pProfile - the profile.pOrder - the order.atg.commerce.CommerceException - indicates that a severe error occured while performing a commerce operation.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 Group.pNickname - - nickname profile stored credit card nick name.pProfile - - Instance of Profile Repository.pUserLocale - - Locale.protected double validateSufficientOnlineCredit(java.lang.String[] pOnlineCreditIds,
atg.commerce.order.Order pOrder)
pOnlineCreditIds - the online credits ids.pOrder - the order.public double getOrderRemaningAmount(atg.commerce.order.Order pOrder)
throws atg.commerce.CommerceException
atg.commerce.CommerceException - if commerce error occurs.protected boolean isNewCreditCards(atg.commerce.order.Order pOrder)
protected boolean isCreditCardEmpty(atg.commerce.order.CreditCard pCreditCard)
This behavior can be overridden 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 - - the order to set-up.pProfile - - the profile to which the order belongs.pOnlineCreditIds - - the online credit cards ids.atg.commerce.CommerceException - if an error occursatg.repository.RepositoryException - if an error occursjava.io.IOException - if an error occursjavax.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.CommerceExceptionpublic void addCreditCardAuthorizationNumber(atg.commerce.order.Order pOrder,
java.lang.String pCreditCardVerificationNumber)
pOrder - - the order that the credit card information is related to.pCreditCardVerificationNumber - - the credit card's verification number.public boolean validateCreditCardAuthorizationNumber(java.lang.String pCreditCardVerificationNumber)
pCreditCardVerificationNumber - - the credit card's verification number.public void addCreditCardDetails(atg.commerce.order.CreditCard pCreditCard,
boolean pUsingStoredCreditCard,
java.lang.String pStoredCreditCardName,
atg.repository.RepositoryItem pProfile,
java.util.Locale pUserLocale)
pCreditCard - - Instance of Credit Card Payment Group.pStoredCreditCardName - - Nickname profile stored credit card nick name.pProfile - - Instance of Profile Repository.pUserLocale - - The user's locale.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 - - the order to process.atg.commerce.CommerceExceptionatg.commerce.order.InvalidParameterExceptionpublic 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 - the order to process.pProfile - user profile.pStoredCreditCardName - credit card nickname.pUserLocale - the user locale.atg.commerce.CommerceExceptionatg.commerce.order.InvalidParameterExceptionprotected 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 re-price.pPricingModels - - the set of all pricing models for the user (item, order, shipping, tax).pLocale - - the locale that the order should be priced within.pProfile - - the user who owns the order.pExtraParameters - -a Map of extra parameters to be used in the pricing.atg.service.pipeline.RunProcessException - if error running pipeline process.public boolean isValidNickNameLength(java.lang.String pNickName,
int pMinNickNameLength,
int pMaxNickNameLength)
pNickName - - the nickname to validate.public boolean validateCreditCardNicknameInput(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
java.lang.String pCreditCardNickname,
int pMinNickNameLength,
int pMaxNickNameLength)
throws StorePurchaseProcessException
pOrder - - the corresponding order.pProfile - - the user's profile.pCreditCardNickname - - the credit card's nickname.pMinNickNameLength - - the minimum length allowed for a nickname.pMaxNickNameLength - - the maximum length allowed for a nickname.StorePurchaseProcessExceptionpublic boolean isPaymentGroupOrderRelationShipExist(atg.commerce.order.PaymentGroup pPaymentGroup)
pPaymentGroup - - the payment group to process.public java.lang.String[] getStoreCreditIds(atg.repository.RepositoryItem pProfile)
pProfile - profile repository item.protected boolean validateCreditCardRequiredFields(atg.commerce.order.CreditCard card,
java.lang.String pVerificationNumber,
java.lang.String pNickname)
card - CreditCard object.pVerificationNumber - - new verification number for credit card.pNickname - - credit card's nickname.