Advanced orders Payment state machine

The following diagram shows the state machine for a Payment as used by the Payment Plug-in Controller. It describes how a Payment moves from state to state when financial transactions, queries, or external edits are made against a payment when the advanced orders function is enabled and payment plug-ins are used to process payment transactions.

The text following the diagram describes the illustration.

More information about payment states is available in the Payment plug-in specification.

When newly created (New), two financial transactions are valid on a Payment: approve or approveAndDeposit.

When a payment is in an Approving state, a possible financial transaction is reverseApproval. If successful, the Payment will move to a Canceled state. The Payment can also move to an Approved state by a query update or by an edit operation performed by the Payment Plug-in Controller. This type of edit operation is commonly associated with offline payment protocols and timeout situations.

When in an Approved state, a Payment can be canceled by a full reverseApproval (the total approved amount is reversed), or it can expire during a query or deposit transaction. With deposits and partial reverseApproval (amount to be reversed is less than the total amount approved) transactions, the Payment stays in the Approved state.

When a financial transaction fails, the Payment goes to the Failed state.

End states for payments are Failed, Canceled, and Expired.

Feedback