Simple text reply
The DIBS API offers the facility, that the response from the DIBS server is returned in a simple text format instead of the normal HTML format. This is beneficial when local scripts are required to process/parse the response from the DIBS server before setting up the page that is returned to the customer.
The helper functions have simple text reply set as a default, because these functions are not normally used in the customer payment process, but is for administrative use only. In order, to receive the response as simple text from the functions auth.cgi, reauth.cgi, ticket_auth.cgi, and capture.cgi, however, the parameter textreply must be included in the call to the function (e.g. textreply=true).
The simple text reply is formatted similarly to a normal GET HTTP request, e.g.
status=ACCEPTED&transact=<transact>&accepturl=<accepturl>
The status parameter is always given as either ACCEPTED or DECLINED, and transact is the transaction number as specified earlier. The simple text reply may contain other parameters depending on the function that is called.
When textreply=true, the values of the parameters accepturl and cancelurl should not be given as the normal URL's. Instead, the parameters may be used for transferring parameters that are required to be returned to the script that processes the answer from the DIBS server. For instance, if accepturl is set to:
parameter1=<param1>¶meter2=<param2>
the simple text reply for an accepted transaction would look like this:
status=ACCEPTED&transact=<transact>¶meter1=<param1>¶meter2=<param2>
PLEASE NOTE:
Your scripts must always be prepared to accept that more parameters than specified in the above are returned from the DIBS server. In other words, you script should not fail, should it happen that future changes in the API requires the functions to return more parameters.
Your scripts must also be prepared to accept that the return-parameters may occur in random order.
For example, if a call to the DIBS Api receives the following string today:
status=ACCEPTED&transact=270002723&cardtype=VISA&approvalcode=123456&fee=61008
then tomorrow a similar call could receives the following string:
newparm=Okay&status=ACCEPTED&cardtype=VISA&approvalcode=123456&fee=61008&transact=270002723