Order processing occurs when a customer has supplied all the necessary information for the Order
and has submitted it for checkout. The processing of an Order
begins with a call to OrderManager.processOrder()
, which calls into the PipelineManager
to execute the processOrder
pipeline. The processOrder
pipeline first validates the Order
and then processes it. Note that, by default, ATG Commerce does not process an incomplete Order
. To allow the processing of incomplete Orders
, you must modify the pipeline accordingly.
The PipelineManager
Nucleus component for ATG Commerce is located at /atg/commerce/PipelineManager
. In ATG Consumer Commerce, the related XML configuration file is defined in /<ATG9dir>/B2CCommerce/config/atg/commerce/commercepipeline.xml
. In ATG Business Commerce, the related XML configuration file is defined in /<ATG9dir>/B2BCommerce/config/atg/commerce/commercepipeline.xml
.
Note: You can use the credit card information listed below to process payments during testing of the order checkout process. The expiration date for all cards can be any date in the future.
Visa: 4111111111111111
MasterCard: 5555555555554444
American Express: 378282246310005
Discover: 6011111111111117
The following table describes the processors in the processOrder
pipeline. They are listed in order of execution.
PipelineLink name | Description |
---|---|
| Executes the If any errors occur during the execution of this processor, execution of the |
| (ATG Business Commerce only) Executes the See the Managing the Order Approval Process chapter for more information. |
| (ATG Business Commerce only) Checks the state of the The |
| (ATG Business Commerce only) For The |
| (ATG Business Commerce only) For The |
| Checks that expired promotions are not used in |
| Removes any empty (unused) shipping groups from the |
| Removes any empty (unused) payment groups from the |
| Validates the special case of an |
| Determines and sets the amount to charge in each |
| (ATG Business Commerce only) Determines and sets the amount to assign to each cost center in the See the Implementing Cost Centers chapter of the ATG Commerce Guide to Setting Up a Store for more information. |
| Moves all promotions that a customer used in the |
| Authorizes all Note: For information on how to prevent the authorization of a user’s credit card under certain circumstances, such as when the items in the |
| Updates the Gift List Repository to reflect the purchase of any gifts in the order. The |
| Sends a message to the messaging system that describes the gifts that were purchased. The message can then be used to execute scenarios. The |
| This processor first calls |
| Sends a message to the messaging system that describes the promotions that were used in the |
| Sends a message that includes the |
The first processor in the processOrder
pipeline, named executeValidateForCheckoutChain
, in turn executes the validateForCheckout
pipeline. The following table describes the processors in the validateForCheckout
pipeline. They are listed in order of execution.
PipelineLink name | Description |
---|---|
| Verifies that the |
| Verifies the addresses for shipping groups and payment groups. The |
| Verifies that all |
| Verifies that the credit card number and expiration date are valid. The credit card is not authorized by a processing system at this point. (See the previous table, which describes the processors in the |
| Verifies that all |
| Verifies that all |
| Verifies the |
| Verifies that all |
| Validates that all the currency codes in the |
For more information about pipelines, the PipelineManager
, and the transactional modes and transitions of the processors in the processOrder
and validateForCheckout
pipelines, see the Commerce Processor Chains section.
Preventing Payment Authorization for Unfulfilled Orders
The processOrder
pipeline performs several checkout functions, including authorizing a user’s credit card for the amount of the order. Under certain circumstances, you may want to prevent the authorization of a credit card, for example, when the order contains items that do not exist in inventory. In this example, the user could be alerted of the lack of inventory and allowed to modify the order before checkout.
You can modify the processOrder
pipeline to prevent credit card authorization under certain conditions. To do so, you need to modify the pipeline to include a branch. One processor in the pipeline should check that the items being purchased do exist in inventory. If they do, then the Order
should continue through the pipeline for checkout (and authorization of the user’s credit card). If the items do not exist in inventory, then the Order
should branch to an alternate pipeline that does not authorize the user’s credit card. Instead, the pipeline might redirect the user to a page that indicates which items could not be allocated from inventory and allows the user to change the Order
. The important concept is that the processOrder
pipeline branches so that the user’s credit card is not authorized.
As previously mentioned, the PipelineManager
Nucleus component for ATG Commerce is located at /atg/commerce/PipelineManager
. In ATG Consumer Commerce, the related XML configuration file is defined in /<ATG9dir>/B2CCommerce/config/atg/commerce/commercepipeline.xml
. In ATG Business Commerce, the related XML configuration file is defined in /<ATG9dir>/B2BCommerce/config/atg/commerce/commercepipeline.xml
.
For information on how to set up a branching pipeline, see the Processor Chains and the Pipeline Manager chapter.