Second part of any transaction is the capture process. Usually this take place at the time of shipping the goods to the customer, and is normally accessed via the DIBS administration interface. You may, however, apply your own back-end application and use capture.cgi for capturing transactions. The only requirement is that you are able to do HTTPS requests from your server. The use of capture.cgi is particular beneficial when your back-end application is integrated with for instance your ERP system or other administrative software.
The standard workflow for capture.cgi is:
Note: There is an alternative way to do several captures in one operation. For further details see the section on batch capture.
https://payment.architrade.com/cgi-bin/capture.cgi
capture.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 | 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. |
orderid | The shops (unique) order identification number as given in the authorisation process. |
[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. |
[force] | If force=true is posted, the DIBS server will attempt to capture otherwise expired authorisations (more than 7 days old). This is achieved through an initial re-authorisation of the original transaction, followed by a capture process. |
[account] | If several departments in a company use the same acquirer contract it may be beneficial to keep track of the transactions by department. Including the account parameter enables separation of the transaction by department. |
[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 . |
Parameter | Type | Description |
result | integer | The result is returned as an integer code. If the results=0 the transaction was successfully captured, otherwise an error code is returned. See the section on code lists for a list of error codes. |
This example shows the call to capture.cgi in the form of a simplified standard HTML form:
<FORM action=https://payment.architrade.com/cgi-bin/capture.cgi method=POST>
<input type="hidden" name="merchant" value="12345678">
<input type="hidden" name="amount" value="2000">
<input type="hidden" name="transact" value="1234567">
<input type="hidden" name="orderid" value="11223344">
<input type="hidden" name="force" Value="yes">
<input type="hidden" name="textreply" Value="yes">
<input type="hidden" name="md5key" Value="cfcd208495d565ef66e7dff9f98764da">
</FORM>