How to fix the 'Internal Server Error' message that appears in a popup when selecting the Twint payment method?


When selecting the Twint payment method in the checkout and confirming the order, a popup appears with error message 'Internal Server Error'.

This error occurs when your server does not allow our module to read the temporary file that requires to be created for the use of Twint. This file is created into the configured php temp directory.

When our module tries to read this file, it receives the following error:

open_base_dir restriction in effect for '/tmp/'

This means that your server configuration does not allow our module to read this file.


You will either need to: 1. Change your open_base_dir restrictions to allow reading the php temporary folder which is currently configured for PHP. 2. Change the PHP temporary folder to a location where the server is allowed to read it.


We need to write the uploaded certificate to the temporary folder because the PHP sockets do not allow to provide a string as a source of the certificate. The certificate has to be provided as a file and therefore we write the certificate into the temporary folder and let openssl read this temporary file.