Class CheckoutAction
java.lang.Object
org.apache.struts.action.Action
com.softslate.commerce.customer.core.BaseAction
com.softslate.commerce.customer.order.CheckoutAction
- Direct Known Subclasses:
AuthorizeNetDPMRelayResponseAction
,AuthorizeNetDPMReturnAction
,CheckoutAddressesAction
,CheckoutAddressesFormAction
,CheckoutComboAction
,CheckoutComboFormAction
,CheckoutComboShippingAction
,CheckoutComboShippingFormAction
,CheckoutConfirmAction
,CheckoutDeclineLoginAction
,CheckoutLoginAction
,CheckoutLoginFormAction
,CheckoutPaymentFormAction
,CheckoutRegisterAction
,CheckoutRegisterFormAction
,CheckoutSettingsAction
,CheckoutShippingAction
,CheckoutShippingFormAction
,CouponAction
,PayPalExpressReturnAction
,PaypointCallbackAction
Struts action class that corresponds to the store's checkout link. Used for
requests to "/Checkout.do" and as a superclass for all of the other action
classes in the checkout process.
The execute
method of this class decides what checkout screen
to direct the user to based on the status of the session and the store's
database configuration.
The idea behind CheckoutAction
is to provide a single
superclass that manages nearly all of the forms and processing for the
checkout process. This allows developers to easily create custom checkout
screens by extending CheckoutAction
, using its methods in
different combinations.
To allow developers to more easily override these methods, a delegate pattern is used, in which most methods are delegated to CheckoutUtils and CheckoutUtilsImpl, which may be subclassed to implement custom functionality.
- Author:
- David Tobey
-
Field Summary
Fields inherited from class org.apache.struts.action.Action
servlet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.struts.action.ActionForward
execute
(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Forwards the user to the appropriate checkout screen based on the status of the session and the store's database settings.loadShippingOptions
(BaseForm baseForm) void
void
prepareCheckoutShippingForm
(BaseForm baseForm) void
prepareLoginForm
(BaseForm baseForm) void
preparePaymentForm
(org.apache.struts.action.ActionForm paymentForm, BaseForm baseForm) void
preparePaymentForms
(BaseForm baseForm) void
prepareRegisterForm
(BaseForm baseForm) org.apache.struts.action.ActionForward
processCheckoutAddresses
(BaseForm baseForm) org.apache.struts.action.ActionForward
processCheckoutAddresses
(BaseForm baseForm, javax.servlet.http.HttpServletResponse response) org.apache.struts.action.ActionForward
processCheckoutConfirm
(BaseForm baseForm) org.apache.struts.action.ActionForward
processCheckoutLogin
(BaseForm baseForm, javax.servlet.http.HttpServletResponse response) org.apache.struts.action.ActionForward
processCheckoutPayment
(BaseForm baseForm) org.apache.struts.action.ActionForward
processCheckoutRegister
(BaseForm baseForm) org.apache.struts.action.ActionForward
processCheckoutShipping
(BaseForm baseForm) org.apache.struts.action.ActionForward
processDeclineLogin
(BaseForm baseForm) processInventoryDiscountCheck
(BaseForm baseForm) processOrderComplete
(BaseForm baseForm) int
processPayment
(PaymentProcessor paymentProcessor, org.apache.struts.action.ActionForm paymentForm, BaseForm baseForm) processShipping
(BaseForm baseForm) processTax
(BaseForm baseForm) boolean
validatePaymentForm
(org.apache.struts.action.ActionForm paymentForm, BaseForm baseForm) Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Field Details
-
log
static org.apache.commons.logging.Log log
-
-
Constructor Details
-
CheckoutAction
public CheckoutAction()
-
-
Method Details
-
execute
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception Forwards the user to the appropriate checkout screen based on the status of the session and the store's database settings.- Overrides:
execute
in classorg.apache.struts.action.Action
- Throws:
Exception
-
prepareLoginForm
- Throws:
Exception
-
prepareRegisterForm
- Throws:
Exception
-
processCheckoutLogin
public org.apache.struts.action.ActionForward processCheckoutLogin(BaseForm baseForm, javax.servlet.http.HttpServletResponse response) throws Exception - Throws:
Exception
-
processCheckoutRegister
public org.apache.struts.action.ActionForward processCheckoutRegister(BaseForm baseForm) throws Exception - Throws:
Exception
-
processDeclineLogin
public org.apache.struts.action.ActionForward processDeclineLogin(BaseForm baseForm) throws Exception - Throws:
Exception
-
loadShippingOptions
- Throws:
Exception
-
prepareCheckoutAddressesForm
- Throws:
Exception
-
prepareCheckoutShippingForm
- Throws:
Exception
-
processCheckoutAddresses
public org.apache.struts.action.ActionForward processCheckoutAddresses(BaseForm baseForm) throws Exception - Throws:
Exception
-
processCheckoutAddresses
public org.apache.struts.action.ActionForward processCheckoutAddresses(BaseForm baseForm, javax.servlet.http.HttpServletResponse response) throws Exception - Throws:
Exception
-
processInventoryDiscountCheck
- Throws:
Exception
-
processCheckoutShipping
public org.apache.struts.action.ActionForward processCheckoutShipping(BaseForm baseForm) throws Exception - Throws:
Exception
-
processShipping
- Throws:
Exception
-
processTax
- Throws:
Exception
-
preparePaymentForms
- Throws:
Exception
-
preparePaymentForm
public void preparePaymentForm(org.apache.struts.action.ActionForm paymentForm, BaseForm baseForm) throws Exception - Throws:
Exception
-
processCheckoutPayment
public org.apache.struts.action.ActionForward processCheckoutPayment(BaseForm baseForm) throws Exception - Throws:
Exception
-
validatePaymentForm
public boolean validatePaymentForm(org.apache.struts.action.ActionForm paymentForm, BaseForm baseForm) throws Exception - Throws:
Exception
-
processPayment
public int processPayment(PaymentProcessor paymentProcessor, org.apache.struts.action.ActionForm paymentForm, BaseForm baseForm) throws Exception - Throws:
Exception
-
processCheckoutConfirm
public org.apache.struts.action.ActionForward processCheckoutConfirm(BaseForm baseForm) throws Exception - Throws:
Exception
-
processOrderComplete
- Throws:
Exception
-