refund.cgi

Description

The function refund.cgi cancels a captured transaction and transfers the money back to the card holders account. In order to be able to do refunds a special agreement is required with your acquirer. refund.cgi supports credit card transactions only, thus for internet banking transactions the refund must be done through your bank. To avoid abuse the refund function must be called using login information. The login and password is identical to those used for accessing the DIBS administration interface (create an API user).

Usage

  • The function refund.cgi is called with the URL (se below)
  • The request is processed by the DIBS server
  • The response from the DIBS server is sent back to the script that send the refund request 

Function call

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

Input parameters

The function refund.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

amountThe smallest unit of an amount, eg. cent for EUR , øre for Danish crowns,
Example:
1,00 EUR = 100 or 1,50 EUR =150

orderIdThe shop’s order number for this particular puchase. It can be seen later when payment is captured, and will in some instances appear on the customer’s bank statement (both numerals and letters may be used).
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.
currencyCurrency specification as indicated in ISO4217 where the EUR is no. 978.
Either the numeric or alphabetic code is accepted.
Also see our list of currencies.
[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>&amount=<amount>"))

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

The function refund.cgi returns one response parameter: result. If result=0 the refund was processed successfully. If the refund was not accepted result relays an error code.


Example

<FORM action="https://login:password@payment.architrade.com/cgi-adm/refund.cgi" method=POST>
    <input type="hidden" name="merchant" value="12345678">
    <input type="hidden" name="transact" value="11111111">
    <input type="hidden" name="amount" value="2000">
    <input type="hidden" name="currency" value="208">
    <input type="hidden" name="orderid" value="11223344">
    <input type="hidden" name="md5key" value="cfcd208495d565ef66e7dff9f98764da">
    <input type="hidden" name="textreply" value="yes">
</FORM>

 
CMS - Content Management System By SiteLoom