|
|||||||||
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.droplet.EmptyFormHandler atg.droplet.GenericFormHandler atg.commerce.order.purchase.PurchaseProcessFormHandler atg.commerce.order.purchase.ExpressCheckoutFormHandler
public class ExpressCheckoutFormHandler
The ExpressCheckoutFormHAndler is used to expedite the checking out of an Order. This supports creating a maximum of one Profile derived HardgoodShippingGroup and one Profile derived CreditCard, followed by committing the Order. If the ExpressCheckoutFormHandler.PaymentGroupNeeded property is true then a CreditCard PaymentGroup will automatically be taken from the Profile. If false, then the user may supply the CreditCard information in a form through the ExpressCheckoutFormHandler.PaymentGroup property. If the ExpressCheckoutFormHandler.ShippingGroupNeeded property is true then a HardgoodShippingGroup will automatically be taken from the Profile. If false, then the user may supply the HardgoodShippingGroup information in a form through the ExpressCheckoutFormHandler.ShippingGroup property. If the ExpressCheckoutFormHandler.CommitOrder property is true, then the ExpressCheckoutFormHandler.ExpressCheckout handler will commit the Order. Set to false in order to display a confirmation page before committing the Order.
GenericFormHandler
,
PurchaseProcessFormHandler
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
ERROR_MISSING_BILLING_ADDRESS
|
static java.lang.String |
ERROR_MISSING_CREDIT_CARD
|
static java.lang.String |
ERROR_MISSING_SHIPPING_ADDRESS
|
static java.lang.String |
MSG_EXPRESS_CHECKOUT_ERROR
|
static java.lang.String |
MSG_ORDER_ALREADY_SUBMITTED
|
static java.lang.String |
MSG_REPRICE_ORDER_ERROR
|
static java.lang.String |
MSG_UNABLE_TO_COPY_ADDRESS
|
static java.lang.String |
MSG_UPDATE_ORDER_ERROR
|
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler |
---|
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE |
Fields inherited from class atg.droplet.GenericFormHandler |
---|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
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 | |
---|---|
ExpressCheckoutFormHandler()
|
Method Summary | |
---|---|
protected void |
commitOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
commitOrder commits the Order. |
protected void |
ensurePaymentGroup(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
ensurePaymentGroup is used to ensure that the Order has a PaymentGroup
of type CreditCard. |
protected void |
ensureShippingGroup(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
ensureShippingGroup is used to ensure that the Order has a
ShippingGroup of type HardgoodShippingGroup. |
java.lang.String |
getDefaultBillingAddressPropertyName()
Return the DefaultBillingAddressPropertyName property. |
java.lang.String |
getDefaultCreditCardPropertyName()
Return the DefaultCreditCardPropertyName property. |
java.lang.String |
getDefaultShippingAddressPropertyName()
Return the DefaultShippingAddressPropertyName property. |
java.lang.String |
getDefaultShippingMethodPropertyName()
Return the DefaultShippingMethodPropertyName property. |
java.lang.String |
getExpressCheckoutErrorURL()
Return the ExpressCheckoutErrorURL property. |
java.lang.String |
getExpressCheckoutSuccessURL()
Return the ExpressCheckoutSuccessURL property. |
java.lang.String |
getOrderId()
Return the OrderId property. |
PaymentGroup |
getPaymentGroup()
Returns property PaymentGroup |
java.lang.String |
getPricingOperation()
Return the PricingOperation property. |
java.util.HashMap |
getProcessOrderMap(java.util.Locale pLocale)
This method calls the OrderManager.getProcessOrderMap(pLocale, map)> to get the process order map
and adds site ID and sales channel to the map if specified. |
java.lang.String |
getSalesChannel()
Returns the salesChannel. |
ShippingGroup |
getShippingGroup()
Returns property ShippingGroup. |
java.lang.String |
getSiteId()
Returns the site ID to be recorded in the order |
boolean |
handleExpressCheckout(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
handleExpressCheckout is used to commit the Order after creating
a CreditCard PaymentGroup and a HardgoodShippingGroup. |
boolean |
isCommitOrder()
Return the CommitOrder property. |
boolean |
isPaymentGroupNeeded()
Return the PaymentGroupNeeded property. |
boolean |
isShippingGroupNeeded()
Return the ShippingGroupNeeded property. |
void |
postExpressCheckout(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
postExpressCheckout is for work that must happen after expressCheckout. |
void |
preExpressCheckout(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
preExpressCheckout is for work that must happen before expressCheckout. |
protected void |
runRepricingProcess(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This reprices the Order. |
void |
setCommitOrder(boolean pCommitOrder)
Set the CommitOrder property. |
void |
setDefaultBillingAddressPropertyName(java.lang.String pDefaultBillingAddressPropertyName)
Set the DefaultBillingAddressPropertyName property. |
void |
setDefaultCreditCardPropertyName(java.lang.String pDefaultCreditCardPropertyName)
Set the DefaultCreditCardPropertyName property. |
void |
setDefaultShippingAddressPropertyName(java.lang.String pDefaultShippingAddressPropertyName)
Set the DefaultShippingAddressPropertyName property. |
void |
setDefaultShippingMethodPropertyName(java.lang.String pDefaultShippingMethodPropertyName)
Set the DefaultShippingMethodPropertyName property. |
void |
setExpressCheckoutErrorURL(java.lang.String pExpressCheckoutErrorURL)
Set the ExpressCheckoutErrorURL property. |
void |
setExpressCheckoutSuccessURL(java.lang.String pExpressCheckoutSuccessURL)
Set the ExpressCheckoutSuccessURL property. |
void |
setOrderId(java.lang.String pOrderId)
Set the OrderId property. |
void |
setPaymentGroup(PaymentGroup pPaymentGroup)
Sets payment group bean to use for modifiing payment groups |
void |
setPaymentGroupNeeded(boolean pPaymentGroupNeeded)
Set the PaymentGroupNeeded property. |
void |
setPricingOperation(java.lang.String pPricingOperation)
Set the PricingOperation property. |
void |
setSalesChannel(java.lang.String pSalesChannel)
Sets the salesChannel. |
void |
setShippingGroup(ShippingGroup pShippingGroup)
Sets shipping group bean to use for modifying the shipping groups |
void |
setShippingGroupNeeded(boolean pShippingGroupNeeded)
Set the ShippingGroupNeeded property. |
void |
setSiteId(java.lang.String pSiteId)
Sets the site ID to be recorded in the order |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
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 java.lang.String CLASS_VERSION
public static final java.lang.String MSG_EXPRESS_CHECKOUT_ERROR
public static final java.lang.String MSG_UPDATE_ORDER_ERROR
public static final java.lang.String MSG_UNABLE_TO_COPY_ADDRESS
public static final java.lang.String MSG_REPRICE_ORDER_ERROR
public static final java.lang.String MSG_ORDER_ALREADY_SUBMITTED
public static final java.lang.String ERROR_MISSING_SHIPPING_ADDRESS
public static final java.lang.String ERROR_MISSING_BILLING_ADDRESS
public static final java.lang.String ERROR_MISSING_CREDIT_CARD
Constructor Detail |
---|
public ExpressCheckoutFormHandler()
Method Detail |
---|
public java.lang.String getSalesChannel()
public void setSalesChannel(java.lang.String pSalesChannel)
pSalesChannel
- public void setShippingGroup(ShippingGroup pShippingGroup)
pShippingGroup
- a ShippingGroup
valuepublic ShippingGroup getShippingGroup()
ShippingGroup
valuepublic void setPaymentGroup(PaymentGroup pPaymentGroup)
pPaymentGroup
- a PaymentGroup
valuepublic PaymentGroup getPaymentGroup()
PaymentGroup
valuepublic void setPaymentGroupNeeded(boolean pPaymentGroupNeeded)
pPaymentGroupNeeded
- a boolean
valuepublic boolean isPaymentGroupNeeded()
boolean
valuepublic void setShippingGroupNeeded(boolean pShippingGroupNeeded)
pShippingGroupNeeded
- a boolean
valuepublic boolean isShippingGroupNeeded()
boolean
valuepublic void setDefaultShippingMethodPropertyName(java.lang.String pDefaultShippingMethodPropertyName)
pDefaultShippingMethodPropertyName
- a String
valuepublic java.lang.String getDefaultShippingMethodPropertyName()
String
valuepublic void setDefaultShippingAddressPropertyName(java.lang.String pDefaultShippingAddressPropertyName)
pDefaultShippingAddressPropertyName
- a String
valuepublic java.lang.String getDefaultShippingAddressPropertyName()
String
valuepublic void setDefaultBillingAddressPropertyName(java.lang.String pDefaultBillingAddressPropertyName)
pDefaultBillingAddressPropertyName
- a String
valuepublic java.lang.String getDefaultBillingAddressPropertyName()
String
valuepublic void setDefaultCreditCardPropertyName(java.lang.String pDefaultCreditCardPropertyName)
pDefaultCreditCardPropertyName
- a String
valuepublic java.lang.String getDefaultCreditCardPropertyName()
String
valuepublic void setCommitOrder(boolean pCommitOrder)
pCommitOrder
- a boolean
valuepublic boolean isCommitOrder()
boolean
valuepublic void setExpressCheckoutSuccessURL(java.lang.String pExpressCheckoutSuccessURL)
pExpressCheckoutSuccessURL
- a String
valuepublic java.lang.String getExpressCheckoutSuccessURL()
String
valuepublic void setExpressCheckoutErrorURL(java.lang.String pExpressCheckoutErrorURL)
pExpressCheckoutErrorURL
- a String
valuepublic java.lang.String getExpressCheckoutErrorURL()
String
valuepublic void setPricingOperation(java.lang.String pPricingOperation)
pPricingOperation
- a String
valuepublic java.lang.String getPricingOperation()
String
valuepublic void setOrderId(java.lang.String pOrderId)
pOrderId
- a String
valuepublic java.lang.String getOrderId()
String
valuepublic void setSiteId(java.lang.String pSiteId)
pSiteId
- a String
valuepublic java.lang.String getSiteId()
String
valuepublic void preExpressCheckout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
preExpressCheckout
is for work that must happen before expressCheckout.
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic void postExpressCheckout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
postExpressCheckout
is for work that must happen after expressCheckout.
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic boolean handleExpressCheckout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
handleExpressCheckout
is used to commit the Order after creating
a CreditCard PaymentGroup and a HardgoodShippingGroup.
pRequest
- the servlet's requestpResponse
- the servlet's response
boolean
value
java.io.IOException
- if there was an error with servlet io
pje
javax.servlet.ServletException
- if there was an error while executing the codeprotected void commitOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws CommerceException, javax.servlet.ServletException, java.io.IOException
commitOrder
commits the Order.
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
CommerceException
- if an error occurs
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursprotected void runRepricingProcess(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RunProcessException, javax.servlet.ServletException, java.io.IOException
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
RunProcessException
- if an error occurs
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursprotected void ensureShippingGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
ensureShippingGroup
is used to ensure that the Order has a
ShippingGroup of type HardgoodShippingGroup.
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
java.io.IOException
- if an error occurs
javax.servlet.ServletException
- if an error occursprotected void ensurePaymentGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
ensurePaymentGroup
is used to ensure that the Order has a PaymentGroup
of type CreditCard.
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
java.io.IOException
- if an error occurs
javax.servlet.ServletException
- if an error occurspublic java.util.HashMap getProcessOrderMap(java.util.Locale pLocale) throws CommerceException
OrderManager.getProcessOrderMap(pLocale, map)> to get the process order map
and adds site ID and sales channel to the map if specified.
- Returns:
-
- Throws:
CommerceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |