Identifying the type of operation

The vads_operation_type field allows to differentiate:

  • a debit
  • a refund
Table 1. Value of the vads_operation_type field
Value Description
DEBIT debit
CREDIT refund

For example:

If the value of vads_operation_type field is set to DEBIT, the script updates the order and registers the transaction details.

If the value of the vads_operation_type is set to CREDIT, the script updates the paid amount or adds a new transaction line to the order.