/** Call init.php to initialize context */ require_once dirname(__FILE__) . '/../../init.php'; require_once dirname(__FILE__) . '/classes/PayplugLock.php'; /** Tips to include class of module and backward_compatibility */ $payplug = Module::getInstanceByName('payplug'); /** Check if logs is enable */ if (Payplug::getConfiguration('PAYPLUG_DEBUG')) { /** Get display errors configuration */ $display_errors = @ini_get('display_errors'); /** Set display errors to true */ @ini_set('display_errors', true); } /** * Check that payplug module is enabled */ if (!Payplug::moduleIsActive()) { die('PayPlug module is not enabled.'); } /** * define getallheaders function for nginx web server */ if (!function_exists('getallheaders')) { function getallheaders() { $headers = array(); foreach ($_SERVER as $name => $value) { if (Tools::substr($name, 0, 5) == 'HTTP_') { $name = str_replace(' ', '-', ucwords(Tools::strtolower(str_replace('_', ' ', Tools::substr($name, 5))))); $headers[$name] = $value; } else { if ($name == 'CONTENT_TYPE') {