EditCmd task command

This command occurs when certain payment information needs to be updated, added, or deleted from an order. EditCmd can occur as long as the order is not closed. For example, EditCmd occur under the following circumstances:

The purpose of this command is to ensure the new payment information is valid and the new payment instruction amounts add up to the order amount. It also ensures that if payment instructions are removed, all related payment actions are reversed whenever possible. Payment instructions can be created during the processing of this type of event.

Payment instructions can be added during StoreAndValidateCmd, after StoreAndValidateCmd and before PrimePaymentCmd, and after PrimePaymentCmd. They can also be added before and after ReservePaymentCmd.

This command verifies that no payment reservation exists with outstanding releases. For example, if two ReservePaymentCmd occur for an order, there should be two FinalizePaymentCmd for the order (assuming two releases occur; the number of FinalizePaymentCmd corresponds to the number of releases). If there are two FinalizePaymentCmd, an EditCmd can occur. If a FinalizePaymentCmd request still needs to occur, an EditCmd cannot occur and an error is returned.

An EditCmd command can occur if a deposit already happened during the PrimePaymentCmd (or ReservePaymentCmd followed by a FinalizePaymentCmd) as long as the amount does not need to be reduced below the deposited amount. An EditCmd to increase the amount is always allowed. A decrease might not be allowed if funds were already deposited (however, the EditCmd can be forced to allow the increase).

The possible payment actions associated with this occurence are not configurable.

Edits will trigger reversals and validation of payment instructions. A TriggerPaymentActionsCmd coommand will trigger equivalent actions for the PrimePaymentCmd.

If a deposit has already happened against a payment instruction that is being removed, the EditCmd will fail unless it is forced. In this case, a tickler will be created to notify a Customer Support Representative that an amount might need to be refunded to the customer.

Example: A customer's credit card order has been captured. The customer later contacts the Customer Support Representative to switch brand of credit cards. The Customer Support Representative edits the payment information to make the change and an EditCmd command occurs. In the TriggerPaymantActionsCmd command, the system verifies that the payment instructions can indeed be changed (that is, payments have not already been reserved for the order), and reads the payment action rules required for the payment method.