diff --git a/src/Message/EMV3DSOrderRequest.php b/src/Message/EMV3DSOrderRequest.php index c053792..d92fa1b 100644 --- a/src/Message/EMV3DSOrderRequest.php +++ b/src/Message/EMV3DSOrderRequest.php @@ -30,11 +30,13 @@ public function getData() public function sendData($data) { + $authorizationHeader = base64_encode("{$this->getMerchantId()}:{$this->getTransactionPassword()}"); + $params = [ 'headers' => [ 'Accept' => '*/*', 'Content-Type' => 'application/json; charset=UTF-8', - 'Authorization' => 'Basic '.base64_encode("{$this->getMerchantId()}:{$this->getTransactionPassword()}"), + 'Authorization' => "Basic {$authorizationHeader}" ], 'body' => json_encode($data), ];