DIBS

DIBS Gateway is a plugin that extends WooCommerce, allowing you to take payments via DIBS Payment. This plugin supports both DIBS FlexWin payment method and DIBS Payment Window method.

Note: This product has been retired and is not for sale. Documentation is no longer being updated.

General information

↑ Back to top
When the order goes through, the user is taken to DIBS to make a secure payment. After payment the user is taken back to your thank you page. DIBS Payment Services is a leading Scandinavian online payment service provider. DIBS can take payment in the following currencies: Danish Krona, Euro, US Dollar $, English Pound £, Swedish Krona, Australian Dollar, Canadian Dollar, Icelandic Krona, Japanese Yen, New Zealand Dollar, Norwegian Krona, Swiss Franc & Turkish Lire. To get started with DIBS you will need an agreement with DIBS as well as a redemption agreement with your bank. Read more about getting started with DIBS here. A SSL certificate is not necessary but strongly recommended. If your site doesn’t hold a certificate the customer will, after a completed purchase, go from a secure connection to a unsecure one. In that case the customers browser prompts the customer with a question whether to continue or not. Would the customer then click cancel, the process does not continue. This does not occur if your server holds a certificate.

Installation

↑ Back to top

  1. Purchase and download the plugin zip file from WooCommerce.com
  2. Login to your WordPress Admin. Click on Plugins | Add New from the left hand menu
  3. Click on the “Upload” option, then click “Browse” to select the zip file from your computer. Once selected, press “OK” and press the “Install Now” button.
  4. Activate the plugin.

Configure the gateway

↑ Back to top
  1. Go to –> WooCommerce –> Settings –> Checkout –>.
  2. You should see “Dibs” displayed across the top of the page as a link. Click on this to configure the plugin, and you will see a list of options:
    • Enable/Disable checkbox for this gateway.
    • The Title option allows you to determine what your customers will see this payment option described as on the checkout page.
    • The Description box controls the message that appears under the payment fields on the checkout page.
    • DIBS Merchant ID – Requested from DIBS.
    • MD5 k1 – needed when using Flexwin as the payment method and when using the DIBS transaction capture setting On order completion. Can be found in your DIBS account, under –> Integration –> MD5 keys.
    • MD5 k2 – needed when using Flexwin as the payment method and when using the DIBS transaction capture setting On order completion. Can be found in your DIBS account, under –> Integration –> MD5 keys.
    • HMAC Key (k) – only needed when using Payment Window as the payment method. Can be found in your DIBS account, under –> Integration –> HMAC keys.
    • Payment Method – Choose Flexwin or Payment Window as the payment method to use. More information about the different payment methods can be found here.
    • Language – Set the language in which the page will be opened when the customer is redirected to DIBS.
    • Alternative payment icon – Specify the URL to an alternative payment icon that the user sees during checkout. Leave blank to use the default image. Alternative payment method logos can be found here.
    • Icon width – The width of the Alternative payment icon.
    • DIBS transaction capture – Select if you want to capture the card payment from WooCommerce or not. When a purchase is completed the amount is first reserved on the customers card. In the next step you as a merchant need to capture the payment. Select On order completion if you want he capture to be triggered from WooCommerce when changing the orderstatus from Processing to Completed. Select On purchase if you want the capture to be done directly when the customer finalizes the purchase in DIBS payment screen.
    • Decorator – Specifies which of the pre-built decorators to use (when using Flexwin as the payment method). This will override the customer specific decorator, if one has been uploaded. Select Responsive to get a mobile optimized payment window experience.
    • Test Mode – Check this box if your DIBS account is set to test mode. Read more about the DIBS test process here.
    • Debug – If this option is checked then details of communication with DIBS are stored in a debug log at location wp-content/uploads/wc-logs
    • Press Save changes to save your changes.

DIBS backoffice setup

↑ Back to top
  1. Log in to your account at http://www.dibspayment.com/
  2. If you are using FlexWin as the payment method; check the box Perform verification of md5key under ->Integration ->md5 keys.
  3. If you are using Payment Window as the payment method; check the box Perform verification of HMAC-key under ->Integration ->HMAC keys.
  4. Go to –> Integration –> Return Values and make sure that the following boxes are checked: – Orderid – Paytype – All fields exclusive of card information response – Transaction status code dibs-backoffice-settings
  5. Check the box Skip step 3 – Payment approved under ->Integration ->FlexWin.

DIBS API Credentials

↑ Back to top
From version 2.1.5 of the DIBS payment gateway you need to create an API Username and Password in DIBS backoffice to be able to process refunds directly from WooCommerce.
  1. Log into your account at DIBS.
  2. Go to → Setup → User Setup. DIBS API User
  3. Click on the tab API Users.
  4. Click the button Create new login.
  5. Enter a username (Login) and password and click the button Create.
  6. Enter the same credentials in API Username & API Password in the payment gateway settings.
  7. Save the payment gateway settings and you should now be able to process refunds from WooCommerce.
 

DIBS transaction ID in order emails

↑ Back to top
In some cases DIBS require that the DIBS Transaction ID is included in the order email sent to the customer. At the moment this isn’t a feature included in the payment gateway. To achieve this you could instead add the following lines to your themes functions.php or in a separate functionality plugin:
/**
* Add the DIBS Transaction ID to order emails
**/
add_filter('woocommerce_email_order_meta_keys', 'dibs_woocommerce_email_order_meta_keys');
function dibs_woocommerce_email_order_meta_keys( $keys ) {
$keys['DIBS Transaction ID'] = 'dibs_transaction_no';
return $keys;
}
view raw gistfile1.php hosted with ❤ by GitHub

Change the payment gateway icon in checkout

↑ Back to top
By default the icon used for card payment displays a Visa and Mastercard logotype. If you want to change the icon for either of the two payment methods in the plugin you can add your own or use one of the available icons provided by DIBS here. There is no setting for changing the icon. You need to hook into a filter by adding the following lines to your themes functions.php or in a separate functionality plugin:
/**
* WooCommerce – DIBS payment gateway
* Filter the payment gateway icon used in checkout
*
**/
// Credit card payment method
add_filter('wc_dibs_icon_html', 'my_wc_dibs_icon_html');
function my_wc_dibs_icon_html( ) {
return '<img src="http://url-to-your-image.png" alt="DIBS – Payments made easy" />';
}
// Invoice payment method
add_filter('wc_dibs_invoice_icon_html', 'my_wc_dibs_invoice_icon_html');
function my_wc_dibs_invoice_icon_html( ) {
return '<img src="http://url-to-your-image.png" alt="DIBS – Payments made easy" />';
}
view raw gistfile1.phtml hosted with ❤ by GitHub

WooCommerce Subscriptions support

↑ Back to top
The DIBS payment gateway has support for recurring payments via WooCommerce Subscriptions. To activate this feature you need to:
  1. Use Payment Window as the selected payment method in your DIBS settings.
  2. Set up an agreement with DIBS about taking subscription payments.
  3. Purchase and configure the WooCommerce Subscriptions extension.

WPML Compatibility

↑ Back to top
DIBS for WooCommerce is both translation ready and fully compatible with WPML, the WordPress Multi-Lingual plugin. To get started, you will need WPML and add-on Plugins i.e. the core WPML Multilingual CMS which is always required and the String translations add-on. You will also need WooCommerce Multilingual, a plugin that connects WooCommerce and WPML.
  • Guide for installing & activating WPML is available on the WPML getting started guide.
  • Guide for installing and activating WooCommerce Multilingual is available here.
 

FAQ

↑ Back to top
Q. I get a 404 on the redirect back to the store after completing a purchase in the DIBS payment window. A. This is probably caused by the fact that pretty permalinks isn’t activated on the site. This module has a redirect to mydomain.com/woocommerce/dibscallback so mod_rewrite must be enabled. Q. Purchases looks ok in my DIBS backoffice but customers can’t see the Thank you page when redirected back to the store after a purchase and the order status doesn’t change to Processing. A. This is probably an error because of wrong configuration in the Return values in the merchants DIBS account. Take a closer look at these instructions: https://woocommerce.com/document/dibs/#section-4 for more information.