FinalizePaymentCmd task command

This command is associated with the fulfillment of the order release. It ensures that funds have been captured because goods have been shipped. It occurs when the order items in the release are fulfilled (items are boxed and shipped).

The possible payment actions associated with this event are: Approve, Deposit, and ReverseApproval.

Example: In an order release, the items being purchased are packaged and the package is scanned. A shipment confirmation notice is sent and the order items are marked "shipped." At this point, the FinalizePaymentCmd is called. Payment rules are read and payment actions are identified to achieve the desired target state for the complete reservation amount (the sum of all Payment Rules amounts). Assuming that a payment approval has already occurred, the payment amount is checked against the earlier approved amount to see if it is less than, equal to, or greater than the approved payment amount for the payment method.

Amounts already in an approved state must be deposited. Depending on the core definition of the deposit payment action for the payment method, deposits can occur right away, even if the approved and deposit amounts do not match, or later when the total approved and deposited amount is actually reached.

If a payment action with the payment back-end system fails, a tickler is created to notify a Customer Service Representative.