Previous in Contents Next in Contents

The Purchase Pipeline

The Purchase pipeline consists of three stages. These stages use components that accept the final purchase of an order form, write an order to database storage and, optionally, finalize a receipt and write the contents of the OrderForm to the receipt database.

The Purchase pipeline can be run once you have run an OrderForm successfully through the Plan pipeline, and have confirmed the customer's desire to finalize a purchase.

Because Purchase pipeline components write to a database, a Purchase pipeline is often a transacted pipeline. A transacted pipeline is a pipeline that consists exclusively of components that are designed and configured to support Microsoft Transaction Server (MTS) transactions.

The template for this pipeline is Purchase.pct. Examples of pipelines based on this template include the Purchase.pcf files that appear in the Config directory for the Volcano Coffee and Clocktower sample sites.

The Purchase pipeline template consists of the following stages.

Purchase Check Stage

The Purchase Check stage is used to verify that the address and credit-card information that the customer has provided meets certain validation criteria.

In the Purchase.pct template, this stage contains no components by default. For an example of components that can be used in this stage, refer to the Purchase.pcf file created by the Site Builder Wizard for custom sites. This pipeline configuration contains two Scriptor components:

The components related to this stage include the following.

Component Description
ValidateCCNumber Performs a standard checksum test on the credit-card number.

Payment Stage

The Payment stage is used to approve credit-card payments. It sets the order._payment_auth_code name/value pair upon credit-card approval. This stage always ensures that _payment_auth_code is set. Otherwise, it generates a pur_bad_payment error.

If a credit card is not approved, this stage should set _payment_auth_code to DENIED and return error level 2.

The details of the payment components will vary depending upon the third-party payment processing system used.

The components related to this stage include the following.

Component Description
DefaultPayment
(included in template)
Places an initial setting on the _payment_auth_code name/value pair.
RequiredPayment
(embedded in stage)
Ensures that the _payment_auth_code name/value pair is not NULL.

Accept Stage

This stage handles the completed order, including initiating order tracking, generating purchase orders, and inventory.

The components related to this stage include the following.

Component Description
ExecuteProcess Executes an application on the server with the specified arguments.
MakePO Generates a purchase order, based on a template file.
PipeToPipe Transfer Transfers an OrderForm or Dictionary from the currently running pipeline to another pipeline.
POtoFile Sends a purchase order (typically the result of MakePO) to a file.
SaveReceipt Writes the contents of the OrderForm to the receipt storage.
SendSMTP Sends a mail message to the specified address.
SQLItem Runs the specified SQL command for each item in the order with the given fields from the order and item as arguments.
SQLItemADO Runs the specified SQL command for each item in the order with the given fields from the order and item as arguments. This component is identical to SQLItem, except that it performs its work using Microsoft® ActiveX® Data Objects (ADO), and can be included in a transacted pipeline.
SQLOrder Runs the specified SQL command once per order, with the given fields from the order as arguments.
SQLOrderADO Runs the specified SQL command once per order, with the given fields from the order as arguments. This component is identical to SQLOrder, except that it performs its work using Microsoft® ActiveX® Data Objects (ADO), and can be included in a transacted pipeline.


© 1997-2000 Microsoft Corporation. All rights reserved.