DIBS PSP

Sana Commerce 8.2
Your provider

Configure a Test DIBS PSP Module

In order to add the DIBS PSP Module to a project, please complete the following steps:

Step 1: Request an account at dibs.dk. By default all new accounts are in the test mode.

Step 2: Copy the 'Sana.Commerce.Payment.Dibs.dll', 'Sana.Commerce.Payment.Dibs.pdb' and 'Sana.Commerce.Payment.Dibs.xml' files from the 'bin' folder of the Dibs add-on package to the 'Frontend/bin' folder of Sana Commerce.

Step 3: Execute the 'MarkOrdersForExport.sql' script from the 'scripts' folder on the Sana Commerce database.

Step 4: Configure the Sana Commerce frontend to use the DIBS payment module. This configuration is performed in the 'web.config' file of the Sana Commerce frontend:

  • Locate the 'DIBS configuration section.txt' file in the 'configuration' folder, which contains the DIBS payment module configuration section;
  • Copy the whole text of this file into the <payment-configuration> section of the 'web.config' file, it will look as follows:

    <module name="Dibs" type="Sana.Commerce.Payment.Dibs.DibsPaymentModule, Sana.Commerce.Payment.Dibs">
      <settings>
        <clear />
        <add name="merchant" value="…" isRequestParameter="true"/>
        <add name="key1" value="…" isRequestParameter="false"/>
        <add name="key2" value="…" isRequestParameter="false"/>
        <add name="immediatecapture" value="true" isRequestParameter="false"/>
        <add name="captureurl" value="https://payment.architrade.com/cgi-bin/capture.cgi" isRequestParameter="false"/>
        <add name="accepturl" value="~/checkout/ordersubmit.aspx?id={0}" isRequestParameter="true"/>
        <add name="cancelurl" value="~/checkout/ordercancelled.aspx?id={0}" isRequestParameter="true"/>
        <add name="callbackurl" value="~/checkout/paymentconfirm.aspx?id={0}" isRequestParameter="true"/>
        <add name="failureurl" value="~/checkout/orderfailed.aspx?id={0}" isRequestParameter="false"/>
        <add name="paytype" value="…" isRequestParameter="true"/>
        <add name="test" value="yes" isRequestParameter="true"/>
        <add name="PaymentPage" value="https://payment.architrade.com/paymentweb/start.action" isRequestParameter="true"/>
        <add name="ResponseUsePost" value="true" isRequestParameter="false"/>
        <add name="DebugDomains" value="localhost" isRequestParameter="false" />
        <add name="DebugConfirmUrl" value="~/checkout/PaymentConfirm.aspx?id={0}" isRequestParameter="false" />
      </settings>
    </module>
  • More detailed information about the configuration values can be found in this chapter and the chapter 'DIBS Specific Configuration Values' below and the chapter 'General External Payment Method Configuration Values'.

Step 5: Configure the DIBS payment method. There are two ways to do this:

  • Configure the DIBS payment method in the Sana Commerce backoffice. For more information read this chapter.
  • The 'ConfigureDibsInDatabase.sql' SQL script can be used to add the 'DIBS' payment method.

    Before executing the script make sure that you have changed the '@siteId' variable (if needed) to match the appropriate website identifier and check whether the currency is correct.

    This payment method will be available for all countries configured in the system. No translations for the payment method will be set by this script - this should be done manually. After the script has been executed, all fields should be checked for the correct values.


    Configure the DIBS payment method by executing the 'ConfigureDibsInDatabase.sql' SQL script, from the 'scripts' folder, on the Sana Commerce database.

Step 6: Find the 'files' folder, where the DIBS payment method icon is stored. Copy the 'files' folder into 'Frontend\content\'.
This icon will be displayed on the frontend in the payment method selection control.

Step 7: Modify the merchant configuration value to the merchant ID of the DIBS account. This ID can be found in the DIBS administration under 'Setup -> Edit profile'.

Step 8: Modify the key1 and key2 configuration values. The values for these keys can be generated in the DIBS administration under 'Integration -> MD5 Keys'.

Step 9: Optionally, set the paytype configuration value to a comma-separated list of the payment types that should be enabled for the DIBS payments. See this list for the possible values.

Step 10: Optionally, change the look and feel of the DIBS payment pages by uploading the decorator files in the DIBS administration under 'Integration -> FlexWin'.
See FlexWin Decorators for more information.

In order to test the payment flow in the development environment, there are two possible scenarios:

  • The development machine/server cannot be accessed externally by the DIBS server (most common scenario). In this case add all domains used by the development server in the 'DebugDomains' setting in the Starter Site's 'web.config' file. Multiple domains can be separated by the ',' character.

    These settings will make it possible to test the whole flow of a test payment, when the confirm page cannot be reached by DIBS. These settings are for the debugging purposes only and should not be used in any live situation.

    If the development machine/server cannot be accessed externally and partial SSL is enabled for the checkout process, then the DIBS module will not be able to correctly update the payment status. Note that this only affects development configurations, not live configurations.

  • The development machine/server can be accessed externally by the DIBS server. In this case you can configure DIBS to test the payment flow. Remove the 'DebugDomains' setting from the payment module configuration.

    If there are problems with the DIBS payment module make sure that URL which is used as the DIBS callback (callbackurl) is on port 80 (or port 443 if you have a SSL certificate installed) and is publically accessible and exists within a firewall that does not prevent DIBS from connecting with it.

Step 11: Test the payment/checkout flow to see if everything works fine using the newly configured payment methods and the correct payment statuses that are set.