DIBS D2 MasterPass for WooCommerce

Introduction

DIBS D2 MasterPass for WooCommerce is a payment gateway allowing you to take payments with MasterPass via DIBS in your WooCommerce store.

Directly from the cart page, the mini cart widget or from a single product page the customer is taken to MasterPass to make a secure payment. After the payment is confirmed the customer is redirected back to the checkout page to complete the order.

To get started with MasterPass you will need an agreement with DIBS.

Installation

  • Download the plugin zip file from Krokedil.
  • Login to your WordPress Admin. Click on Plugins | Add New from the left hand menu
  • 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.
  • Activate the plugin.

Configuration

  1. Navigate to → WooCommerce → Settings → Checkout.
  2. The title MasterPass is visible as an available payment method in the horizontal menu. Click on the link to get to the settings page for this payment method.
  3. Enable/disable – Check this checkbox if you want this payment method to be available in the checkout.
  4. Title – Allows you to determine what your customers will see this payment option described as on the checkout page.
  5. Description – Controls the message that appears under the payment fields on the checkout page.
  6. Merchant ID – Your Integration ID sent to you from DIBS.
  7. HMAC Key (k) – Your HMAC Key you can find in your DIBS backoffice/admin.
  8. Active Cards – Select the types of debit/credit cards you accept in MasterPass.
  9. Display on product page – Wether or not to display a MasterPass buy button on product pages.
  10. Image width – The width of the Product page buy button (in px).
  11. Display in cart widget – Wether or not to display a MasterPass buy button in the mini cart widget.
  12. Image width – The width of the cart widget buy button (in px).
  13. Test Mode – Check this box if you are doing test purchases. Get in touch with DIBS for more information about test purchases.
  14. Debug – If this option is checked details of communication with DIBS/MasterPass are stored in a debug log. The Debug Log can be viewed by navigating to → WooCommerce → System Status and then click on the tab Logs.

Mandatory WooCommerce Settings

If you choose to display the MasterPass button on single product pages the checkbox Redirect to the cart page after successful addition must be unchecked in
WooCommerce → Settings → Products → Display. Otherwise the customer will be redirected to the cart page instead.

Mandatory DIBS backoffice Settings

  • Login to your DIBS backoffice. Navigate to → Integration → HMAC Key.
  • At the moment the checkbox Perform HMAC checksum control should not be checked.

Send callback URL to DIBS

To get the redirect from MasterPass back to the store to work as expected (after the customer have completed the purchase in MasterPass payment window), you need to send your callback URL to DIBS. This is not possible to handle dynamically in the plugin at the moment. DIBS need to receive this URL and add it to MasterPass system before you can start using the plugin.

Your callback url is the URL to your checkout page. This URL can be found in the right column on the plugin settings page. Look under the title Callback URL to send to DIBS.

Available shipping countries

In MasterPass the customer have the possibility to set one or several addresses that can be used to automatically populate the checkout form in WooCommerce.

The DIBS D2 MasterPass payment gateway sends the countries that you have specified as available shipping countries in WooCommerce (specified in → WooCommerce → Settings→ Shipping → Restrict shipping to Location(s)) to MasterPass.

For instance – if you only sell to customers in Sweden and the customer have their shipping address set to Norway in MasterPass, that address won’t be passed back to your WooCommerce store as the customer address.

 

Troubleshooting

Go to WooCommerce → Settings → Checkout → MasterPass and active the debug function.

Activate MasterPass debug function

Make a purchase from the cart-page by clicking on the MasterPass button and see what error message that will appear in the top of your screen.

Here is a Wiki on errors that can appear and answers on why you receive these errors:


– Subscriber don’t have valid MasterPass agreement –

  • You have probably entered the wrong Merchant-ID in the settings for the MasterPass plugin
  • You have the testmode box checked in the plugin settings but your account at DIBS has been set to “live-mode” or vice versa.
  • The agreement for MasterPass has not been finalized at DIBS.

MasterPass debug error message