Paymentech plug-in batch states

A Paymentech batch passes various states from the time it is created until the time it is deleted. In most cases, the changes occur automatically during interaction with the Paymentech gateway.

The Paymentech batch state machine

For a given batch, the start state is OPEN and the final state is CLOSED. When the ProcessPaymentechBatch scheduled job runs with the a valid value set for the merchConfId parameter, a new batch is created in the OPEN state. All pending deposits and credits belonging to the merchant are added to the batch. The batch is then sent to the Paymentech gateway. If it is sent successfully, the state changes to SENT. If the send process fails, the batch remains in the OPEN state.

Once a batch is sent, a GetPaymentechBatch scheduled job is automatically scheduled by the ProcessPaymentechBatch job for this batch. After some configurable interval, the GetPaymentechBatch job runs, and sends a Request For Response (RFR) to the gateway for the batch, and processes the RFR response. If the RFR response is received successfully, and all of the transactions in the batch are processed successfully, the batch is marked as CLOSED. If only some of the transactions in the batch are successful, the batch is marked as PARTIALCLOSED.

Any batch in any state can be changed to CLOSED using the force close action.