PPCPaymentechBatchCtrlCmd

The site level scheduler command, PPCPaymentBatchCtrlCmd, runs daily to process all batches with open state. The batches are processed by calling the settleBatch API of Paymentech plug-in. The command accepts the merchant configuration identifier (the combination of merchant identifier, payment system name, and payment configuration group) as the input parameter.

The PPCPaymentechBatchCtrlCmd has the following behavior:

  1. Scheduler PPCPaymentechBatchCmd runs.
    1. This scheduler command calls the createBatch API to create a new batch.
    2. A batch is created in OPEN state.
    3. This scheduler command calls the settleBatch API to process the batch transaction.
  2. Paymentech plug-in sends the batch request to Paymentech batch gateway.
    1. Paymentech plug-in builds the batch request containing all payment transactions in the batch and sends the request to Paymentech batch gateway. Then the batch state becomes SENT. Note that if a communication error or request format error prevents the request from being sent to the Paymentech batch gateway the batch will stay in OPEN state and a tickler is generated indicating the batch request was not sent to the Paymentech batch gateway.
    2. Another scheduler PPCPaymentechBatchGetCtrlCmd is added to the scheduler job to be run later after a configured time.
  3. PPCPaymentechBatchGetCtrlCmd runs and tries to get the batch response from Paymentech batch gateway.
    1. This scheduler command builds the RFR request and sends it to the Paymentech batch gateway.
    2. The current thread sleeps for a while, and then tries to read the response.
    3. The response contains the results of the payment transactions in the batch. And all payment transactions are successfully processed.
  4. The Payment Plugin controller updates the tables to indicate successful deposit or credit action.

    For each transaction in the batch:

    1. The corresponding record in PPCPAYTRAN is updated where STATE is updated to 1. For deposit transaction, the corresponding record in PPCPAYMENT is updated where DEPOSITEDAMOUNT is updated to the requested deposit amount; for credit transaction, the corresponding record in PPCCREDIT is updated where CREDITEDAMOUNT is updated to the requested credit amount. The corresponding record in PPCPAYINST is updated where DEPOSITEDAMOUNT (for deposit) or CREDITEDAMOUNT (for credit) is updated to the requested deposit/credit amount and STATE is updated to 1.
    2. The state of batch is changed to CLOSED.