cancel.cgi

 

Description

cancel.cgi cancels an authorization. If the acquirer used supports reversals, the system automatically sends one such along and thereby releasing any reserved amounts.

 

Usage

The standard work flow for cancel.cgi is: 

 

  • The below described set of parameters are posted to.
  • The DIBS server processes the information.
  • The result is posted back to the script that sent the request.

 

Function call

https://login:password@payment.architrade.com/cgi-adm/cancel.cgi

 

Input parameters

cancel.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. 

transact

The unique DIBS identification number for the transaction you want to capture. The transact is returned from a successful authorisation, and is a as minimum 6-digit integer , e.g. transact=123456.

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 and is recommended.

[account]

If the account parameter was initially used when the payment was made it should also be used here.

[md5key]

This variable enables a MD5 key control of the values received by DIBS. This control  confirms that the values sent to DIBS has not been tampered with during the transfer. The MD5 key is calculated as:

MD5(key2 + MD5(key1 + “merchant=<merchant>&orderid=<orderid>&transact=<transact>))

Where key1 and key2 are shop specific keys available through the DIBS administration interface, and + is the concatenation operator. NB! MD5 key check must also be enabled through the DIBS administration interface in order to work. Further details on MD5-key control .

[orderid]

The shops (unique) order identification number as given in the authorisation process.

 

Return Parameters

These parameters are returned always:

Parameter

Description

status

Denotes the result of the cancel request. It will hold on of two values: ACCEPTED/DECLINED


If the cancel request is accepted, these parameters are also returned:

Parameter

Description

transact

Unique transactionnumber given by DIBS (numeric, min. 6 digits. For instance transact=3676713)

cardtype

The cardtype used (see this list of possible cardtypes)


If the cancel request is declined, these parameters are returned:

Parameter

Description

reason

When declined a reason is returned in this parameter. See this list of possible reasons.

 

Example

This example shows the call to cancel.cgi in the form of a simplified standard HTML form:

<form action="https://login:password@payment.architrade.com/cgi-adm/cancel.cgi" method="post">
<input type="hidden" name="merchant" value="12345678" />
<input type="hidden" name="orderid" value="11223344" />
<input type="hidden" name="transact" value="12345678" />
<input type="hidden" name="md5key" value="cfcd208495d565ef66e7dff9f98764da" />
<input type="hidden" name="textreply" value="yes" />
</form>

 

Security measures

To ensure that only you can cancel authorizations, cancel.cgi requires credentials: User name and password. Look for the above example. User name and password are the same that are used for access to the DIBS-administration or the special API user type, you can create in the administration.