diff --git a/src/Adyen/HttpClient/CurlClient.php b/src/Adyen/HttpClient/CurlClient.php index dcb0d3f9e..f2d521d23 100644 --- a/src/Adyen/HttpClient/CurlClient.php +++ b/src/Adyen/HttpClient/CurlClient.php @@ -306,6 +306,13 @@ public function requestHttp(Service $service, $requestUrl, $params, $method, $re $libraryVersion ); + // If headers are provided in requestOptions include them in the request + if (!empty($requestOptions['headers'])) { + foreach ($requestOptions['headers'] as $headerKey => $headerValue) { + $headers[] = $headerKey . ': ' . $headerValue; + } + } + // If idempotency key is provided as option include into request if (!empty($requestOptions['idempotencyKey'])) { $headers[] = 'Idempotency-Key: ' . $requestOptions['idempotencyKey'];