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

public class CheckoutAction extends BaseAction
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 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 class org.apache.struts.action.Action
      Throws:
      Exception
    • prepareLoginForm

      public void prepareLoginForm(BaseForm baseForm) throws Exception
      Throws:
      Exception
    • prepareRegisterForm

      public void prepareRegisterForm(BaseForm baseForm) throws Exception
      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

      public Collection loadShippingOptions(BaseForm baseForm) throws Exception
      Throws:
      Exception
    • prepareCheckoutAddressesForm

      public void prepareCheckoutAddressesForm(CheckoutAddressesForm baseForm) throws Exception
      Throws:
      Exception
    • prepareCheckoutShippingForm

      public void prepareCheckoutShippingForm(BaseForm baseForm) throws Exception
      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

      public Map processInventoryDiscountCheck(BaseForm baseForm) throws Exception
      Throws:
      Exception
    • processCheckoutShipping

      public org.apache.struts.action.ActionForward processCheckoutShipping(BaseForm baseForm) throws Exception
      Throws:
      Exception
    • processShipping

      public Map processShipping(BaseForm baseForm) throws Exception
      Throws:
      Exception
    • processTax

      public Map processTax(BaseForm baseForm) throws Exception
      Throws:
      Exception
    • preparePaymentForms

      public void preparePaymentForms(BaseForm baseForm) throws Exception
      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

      public Map processOrderComplete(BaseForm baseForm) throws Exception
      Throws:
      Exception