Share via


RequiredOrderInitCy, RequiredOrderInit

Use this component to initialize the payment authorization code, order ID, totals, and subtotals in an order form.

The RequiredOrderInit component is for backward compatibility only. The RequiredOrderInitCy component operates in both 3.0 compatibility mode and in 4.0 mode pipelines. For more information, see Currency Enhancements.

Intended use: Order Processing pipeline, Order Initialization stage.

Configuration Values

None.

Values Read

The RequiredOrderInitCy and RequiredOrderInit components read the following values from the indicated dictionaries.

Key Dictionary Description
order_id Order The ID of the order.
item.quantity Order The quantity of an item.

Values Written

The RequiredOrderInitCy component writes the following values to the Order dictionary. The RequiredOrderInit component writes the same keys but without cy_.

Key Description
order_id The ID of the order.
item._cy_oadjust_adjustedprice The total cost of an item.
item._n_unadjusted The number of items that have not been discounted.
_cy_total_total The total cost of the order.
_cy_oadjust_subtotal The subtotal of all items in the items list.
_cy_shipping_total The total cost of shipping all items in the order.
_cy_tax_total The total tax for the order.
_cy_handling_total The total handling cost for the order.
_payment_auth_code The payment authorization code.

Remarks

The RequiredOrderInitCy and RequiredOrderInit components perform the same actions although on different dictionary keys. The following discussion uses the keys for the RequiredOrderInitCy component.

First, the RequiredOrderInitCy component ensures that the order_id key has a value. If it does not, the RequiredOrderInitCy component generates a unique order ID and assigns it to this key.

Next, to ensure order integrity, the component initializes the following keys by assigning NULL to them:

_cy_total_total
_cy_oadjust_subtotal
_cy_shipping_total
_cy_tax_total
_cy_handling_total
_cy_tax_included
_payment_auth_code

Finally, for each item in the items collection, the RequiredOrderInitCy component copies the value stored in the quantity key to the _n_unadjusted key to initialize the undiscounted quantity of the item, and initializes the _oadjust_adjustedprice (the total cost of the item) key to zero (0).


All rights reserved.