Duplicate Handling

The gateway software system automatically detects duplicate transactions. This is the default configuration. You can override this functionality by specifying a value for the “allow_duplicates” variable. This variable can be set to the value of “yes” or “no”, where “no” is the default. Setting this value to “yes” will prevent the software from automatically detecting duplicate transactions and declining them. (see the preceding chapter on Business Rules for additional information). When the software identifies a duplicate transaction, one of the following messages is returned:

DUPLICATE_TRANSACTION_ALREADY_APPROVED
 

DUPLICATE_TRANSACTION_PENDING

When your software receives this message, you can override the duplicate message by setting “allow_duplicates” to “yes” if you really expect this duplicate transaction. If you were not expecting this transaction to be a duplicate, this message indicates the transaction has been previously submitted in the past few minutes for the exact same amount on the exact same cardnumber, and that transaction was approved. You may want to use one of the “SearchTransaction” web services to retrieve that previous approval data, or have some other method of handling duplicates in your software. Transactions are identified as a duplicate as follows:

  1. The same clientid/siteid combination is used.
  2. The same cardnumber is used.
  3. The same transaction type is used.
  4. The same amount is specified.
  5. No invoice number (client_transref field) is sent, or the same invoice number is used.
  6. The transactions occurs within a short time interval of each other(approximately 30 minutes).

Control window for duplicate checking

We have added finer control over the automated features that search for duplicate transactions. To give the developer better control, a new (and OPTIONAL) variable, “duplicates_window” has been added. This value can be sent to the gateway, along with the normal payload (as XML or name/value pairs). The default for this variable is 30, which represents the current configuration of 30 minutes to search backwards for a duplicate and the maximum value is 20000.

Note: That setting “allow_duplicates” to “yes” will disable all duplicate checking and avoid using this setting altogether.