ConfigurationDIBS PSP Module

DIBS PSP Module

Configure a Test DIBS PSP Module

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

  • Copy the 'Sana.Commerce.Payment.dll', 'Sana.Commerce.Payment.pdb', 'Sana.Commerce.Payment.xml', 'Sana.Commerce.Payment.Dibs.dll', 'Sana.Commerce.Payment.Dibs.pdb' and 'Sana.Commerce.Payment.Dibs.xml' files from the DIBS release package to the 'Frontend/Bin' folder of Sana Commerce.
  • Execute the 'MarkOrdersForExport.sql' script from the 'scripts' folder in the Sana Commerce database.
  • Configure the Sana Commerce frontend to use the DIBS payment module. This configuration is performed in the Starter Site's 'web.config' file:
    • Locate the 'DIBS configuration section.txt' file, 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.
  • Configure the DIBS payment method. There are two ways to do this:
    • Configure the DIBS payment method in the backoffice. For more information read this chapter.
    • The 'ConfigureDibsInDatabase.sql' SQL script will add the 'DIBS' payment method.

      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.

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


      Configure the DIBS payment method by executing the 'ConfigureDibsInDatabase.sql' SQL script in the Sana Commerce database.

  • 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.
  • Request an account at dibs.dk. By default all new accounts are in the test mode.
  • Modify the merchant configuration value to the merchant ID of the DIBS account. This ID can be found under 'Setup -> Edit profile' in the DIBS administration.
  • Modify the key1 and key2 configuration values. The values for these keys can be generated under 'Integration -> MD5 Keys' in the DIBS administration.
  • 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.
  • Optionally, change the look and feel of the DIBS payment pages by uploading the decorator files under 'Integration -> FlexWin' in the DIBS administration.
    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.
  • Test the payment/checkout flow to see if everything works using the newly configured payment methods and the correct payment statuses that are set.
ConfigurationDIBS PSP Module