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

merchantShop identification. The Merchant number appears in the e-mail received from DIBS during registration with DIBS or on your contract.

Your merchant number can also be retreived by contacting your respective DIBS support department below.
Denmark
Norway
Sweden

transactThe 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.
textreplyIf this variable is set to be true (e.g. textreply=yes), then the DIBS system 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 from DIBS. You may use either port 80 or port 20080.
[orderid]The shops (unique) order identification number as given in the authorisation process. 
[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=&orderid=&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
[fullreply]If this variable is set, all variables will be returned (as defined in the DIBS admin). Note: This only works when used together with textreply.
[account]If multiple departments utilize the company’s acquirer agreement with the acquirer, it may prove practical to keep the transactions separate at DIBS. An ”account number” may be inserted in this field, so as to separate transactions at DIBS.
 

Return Parameters

These parameters are returned always:

Parameter

Description

statusDenotes 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

transactThe 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.
cardtypeThe cardtype used (see this list of possible cardtypes)

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

Parameter

Description

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

 
CMS - Content Management System By SiteLoom