Payment method Datatrans

This article is machine translated.

Datatrans is a Swiss payment service provider. The module implements the payment interface for processing transactions via a variety of payment methods such as VISA, Mastercard, Postfinance and AMEX.

General settings

Setting Default setting Description
Transaction type Authorize and collect Here you can define the transaction type.

  • Authorize and collect
    Transactions of this type are sent for authorization. The transaction is automatically routed for settlement if the transaction is successful.
  • Authorize Only
    Transactions of this type are sent when the merchant wants to have the credit card checked for the quantity of goods sold. If the merchant does not have enough goods in stock or wants to check the orders before the goods are delivered, this transaction type will be transferred.

Configuration of the payment provider

Setting Default setting Description
Merchant ID - The merchant ID.
HMAC Key - Key used to encrypt exchanged data.
Hash Method MD5 (deprecated) Hash method to encrypt the exchanged data. Available for selection are:

  • MD5
    Insecure and therefore not recommended
  • SHA-256
    Recommended setting
Convert HMAC key - Defines if the entered HMAC key should be converted to bytes before encrypting the exchanged data. This is necessary if you copy the HMAC key 1:1 from the Datatrans security settings.


Setting Default setting Description
Use test system - Defines if all transactions should be processed through the Datatrans test system.
Enable logging - Write transaction information to the system log files.

Configuration at Datatrans

In order for the module to work correctly, some settings must be made on the payment provider’s site.
To do this, log in to the system and make the following settings:

Configuration in Contao

Unfortunately, Datatrans uses a POST request to send the shop visitor back from the merchant portal to Contao,
which interferes with the request token check.
To circumvent this limitation, you must disable the referer check in the Contao settings (disableRefererCheck).