The purpose of changestatus.cgi is to allow changing the status of a specific transaction on the DIBS server, without using the DIBS administration interface. The transaction may have the following status:
For obvious reasons, it is not possible to change the status of an already captured transaction in order to allow it to be captured again. Transactions may change status in the following manner:
The standard workflow of changestatus.cgi is:
https://login:password@payment.architrade.com/cgi-adm/changestatus.cgi
For security reasons changestatus.cgi must be called using login information (using basic http authorisation). The username and password are identical to the ones used for accessing the DIBS administration interface (create an API user). Besides login information, changestatus.cgi accepts the following input parameters:
Parameter | Description |
merchant | The merchant parameter is the shops DIBS identification number. The merchant number is available in the order confirmation email and is a 7-digit integer. |
amount | Amount to be transferred. The amount must be given in smallest possible unit, e.g. cents 100 = USD 1. |
transact | All transactions are given a unique DIBS identification number, it is a as minimum 6-digit integer , e.g. transact=123456. |
action | action must take on either: “new”, “matched”, “canceled”, or “captured” depending on the status you want the transaction to have afterwards. |
force | Use this to change status from either Pending or Declined to New, Cancelled or Captured (see below for more information). |
textreply | If this variable is set (e.g. textreply=true) the DIBS server returns its answer in simple text format . If you are not using the standard DIBS payment window, e.g. using server-to-server requests, this significantly simplifies parsing the answer. |
[account] | If several departments in a company use the same acquirer contract it may be beneficial to keep track of the transactions by department. Setting the account parameter enables separation of the transaction by department. |
DIBS is not responsible for any errors to the status that might occur when using the force parameter. Remember to use the transstatus.pml script to check the status of the transactions, before using the force parameter.
The response from changestatus.cgi contains the parameter status. If status=ACCEPTED, the status change was accepted and done. If status=DECLINED, the status change was declined. If the status change was declined, the parameter reason will also be returned.
Parameter | Type | Description |
status | string | ACCEPTED/DECLINED |
[reason] | integer | In case of status=DECLINED, the reason parameter returns an integer error code. Please refer to the list of error codes. |
<FORM action="https://login:password@payment.architrade.com/cgi-adm/changestatus.cgi" method=POST>
<input type="hidden" name="merchant" value="12345678">
<input type="hidden" name="amount" value="2000">
<input type="hidden" name="action" value="matched">
<input type="hidden" name="textreply" Value="yes">
</FORM>