The validateForCheckout pipeline chain verifies that the Order is ready for checkout. The validateForCheckout pipeline chain is executed by the validateOrder() method in the OrderManager and the processOrder pipeline chain. The validateOrder() method adds the given Order, Locale, and OrderManager to its parameter list, which is supplied to the executing chain. The pipeline chain’s transaction mode is TX_REQUIRED.

The following sections describe each processor in the pipeline chain.

validateOrderForCheckout

This processor validates that there is at least one ShippingGroup, one PaymentGroup, and one CommerceItem in the Order before checking out.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/ValidateOrderForCheckout

Object

atg.commerce.order.processor.ProcValidateOrderForCheckout

Transitions

Return value of 1 will execute verifyOrderAddresses next.

verifyOrderAddresses

This processor verifies the given addresses in the HardgoodShippingGroup and CreditCard objects. It does this by calling the verifyAddress() method in the AddressVerificationProcessor, which is configured in the verifyOrderAddresses processor.

Note: The AddressVerificationProcessor is not a pipeline processor.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/VerifyOrderAddresses

Object

atg.commerce.order.processor.ProcVerifyOrderAddresses

Transitions

Return value of 1 will execute validateShippingGroupsForCheckout next.

validateShippingGroupsForCheckout

This processor validates ShippingGroups before checking an Order out. It checks that all CommerceItems in the Order are assigned to ShippingGroups and that all the required fields in all the ShippingGroups, regardless of type, are not null or empty String.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/ValidateShippingGroupsForCheckout

Object

atg.commerce.order.processor.ProcValidateShippingGroupsForCheckout

Transitions

Return value of 1 will execute creditCardModCheck next.

creditCardModCheck

This processor does a mod check on credit card numbers to see if they are valid. The verifyCreditCard method of the atg.payment.creditcard.ExtendableCreditCardTools class is called on each credit card number in the Order.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/CreditCardModCheck

Object

atg.commerce.order.processor.ProcCreditCardModCheck

Transitions

Return value of 1 will execute validatePaymentGroupsForCheckout next.

validatePaymentGroupsForCheckout

This processor validates PaymentGroups before checking an Order out. It checks that all CommerceItems, shipping costs, and tax in the Order are assigned to PaymentGroups. It also checks that all the required fields in all the PaymentGroups, regardless of type, are not null or an empty String.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/ValidatePaymentGroupsForCheckout

Object

atg.commerce.order.processor.ProcValidatePaymentGroupsForCheckout

Transitions

Return value of 1 will execute validateCostCentersForCheckout next.

validateCostCentersForCheckout

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/ValidateCostCentersForCheckout

Object

atg.commerce.order.processor.ProcCostCentersForCheckout

Transitions

Return value of 1 will execute validateShippingCostsForCheckout next.

validateShippingCostsForCheckout

This processor validates that all shipping costs are accounted for by a PaymentGroup. Shipping costs are accounted for if there is only one PaymentGroup and it has no Relationships, if the ShippingGroup has been assigned to a PaymentGroup, or if an order level Relationship exists in the Order that covers the entire amount of the Order.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/ValidateShippingCostsForCheckout

Object

atg.commerce.order.processor.ProcValidateShippingCostsForCheckout

Transitions

Return value of 1 will execute validateOrderCostsForCheckout next.

validateOrderCostsForCheckout

This processor validates that all order costs are accounted for by a PaymentGroup. Order costs are accounted for if there is only one PaymentGroup and it has no Relationships or if order level Relationships exist in the Order that cover the entire amount of the Order.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/ValidateOrderCostsForCheckout

Object

atg.commerce.order.processor.ProcValidateOrderCostsForCheckout

Transitions

Return value of 1 will execute validateHandlingInstructionsForCheckout next.

validateHandlingInstructionsForCheckout

This processor validates that the total quantities in the HandlingInstructions do not exceed the amount assigned to the ShippingGroup. It does this by iterating over all the HandlingInstructions in the ShippingGroups and validating that the sum of the quantities in the HandlingInstructions do not exceed that which is assigned to the ShippingGroup. It will also catch errors if HandlingInstructions contain errors such as invalid ShippingGroup and CommerceItem IDs or CommerceItems that are not assigned to the ShippingGroup that contains the HandlingInstruction.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/
  ValidateHandlingInstructionsForCheckout

Object

atg.commerce.order.processor.
  ProcValidateHandlingInstructionsForCheckout

Transitions

Return value of 1 will execute validateCurrencyCodes next.

validateCurrencyCodes

Verifies that all the PriceInfo objects in the Order have been priced using the same currency code. The currency code in the OrderPriceInfo object is the one that must be matched. The code checks the TaxPriceInfo object’s currency code in the Order and all the ShippingPriceInfo and ItemPriceInfo currency codes in all the ShippingGroups and CommerceItems, respectively.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/ValidateCurrencyCodes

Object

atg.commerce.order.processor.ProcValidateCurrencyCodes

Transitions

Return value of 1 will execute checkForDiscontinuedProducts next.

checkForDiscontinuedProducts

Ensures that the order does not contain any products that are no longer available.

Transactional Mode

TX_MANDATORY

Component

/atg/commerce/order/processor/CheckForDiscontinuedProducts

Object

atg.commerce.order.processor.ProcCheckForDiscontinuedProducts

Transitions

None, this is the last link in the chain and will cause the PipelineManager to return to the caller.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices