com.elasticpath.service.shoppingcart
Interface CheckoutEventHandler

All Superinterfaces:
EpService
All Known Implementing Classes:
AbstractCheckoutEventHandlerImpl, NullCheckoutEventHandlerImpl

public interface CheckoutEventHandler
extends EpService

This interface is implemented by services who wish to be notified of events occuring during the checkout process so that an additional action can be taken before or after the checkout.


Method Summary
 void postCheckout(ShoppingCart shoppingCart, OrderPayment orderPayment, Order completedOrder)
          This event occurs after a checkout process has completed.
 void preCheckout(ShoppingCart shoppingCart, OrderPayment orderPayment)
          This event occurs before any action is taken as part of the checkout process.
 void preCheckoutOrderPersist(ShoppingCart shoppingCart, OrderPayment orderPayment, Order completedOrder)
          This event occurs after a checkout has been processed but before the order has been persisted.
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

postCheckout

void postCheckout(ShoppingCart shoppingCart,
                  OrderPayment orderPayment,
                  Order completedOrder)
This event occurs after a checkout process has completed.

Parameters:
shoppingCart - the shopping cart being checked out
orderPayment - information about the method of payment
completedOrder - the order object resulting from the checkout

preCheckout

void preCheckout(ShoppingCart shoppingCart,
                 OrderPayment orderPayment)
This event occurs before any action is taken as part of the checkout process.

Parameters:
shoppingCart - the shopping cart being checked out
orderPayment - information about the method of payment

preCheckoutOrderPersist

void preCheckoutOrderPersist(ShoppingCart shoppingCart,
                             OrderPayment orderPayment,
                             Order completedOrder)
This event occurs after a checkout has been processed but before the order has been persisted. This event occurs between preCheckout and postCheckout.

Parameters:
shoppingCart - the shopping cart being checked out
orderPayment - information about the method of payment
completedOrder - the order object resulting from the checkout