diff --git a/src/authnet/AuthnetWebhook.php b/src/authnet/AuthnetWebhook.php index 3ae20aa..e56c347 100644 --- a/src/authnet/AuthnetWebhook.php +++ b/src/authnet/AuthnetWebhook.php @@ -132,10 +132,13 @@ protected function getAllHeaders() if (function_exists('apache_request_headers')) { $headers = apache_request_headers(); } else { - $headers = array_filter($_SERVER, function($key) { - return strpos($key, 'HTTP_') === 0; - }, ARRAY_FILTER_USE_KEY); + $headers = []; + foreach ($_SERVER as $key => $value) { + if (strpos($key, 'HTTP_') === 0) { + $headers[str_replace('_', '-', substr($key, 5))] = $value; + } + } } return $headers; } -} \ No newline at end of file +}