Skip to content

Commit 8dfae5e

Browse files
authored
Merge pull request #30 from alexw23/added-headers-to-refund
[Hotfix] Added headers to refunds
2 parents a2c5fb3 + 75a91b5 commit 8dfae5e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Message/RefundRequest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ public function getData()
5656

5757
public function sendData($data)
5858
{
59-
$httpResponse = $this->httpClient->request('POST', $this->getEndpoint(), [], json_encode($data));
59+
$headers = [
60+
'Authorization' => 'Basic ' . base64_encode($this->getApiKey() . ':' . $this->getPassword())
61+
];
62+
63+
$httpResponse = $this->httpClient->request('POST', $this->getEndpoint(), $headers, json_encode($data));
6064

6165
return $this->response = new RefundResponse($this, json_decode((string) $httpResponse->getBody(), true));
6266
}

0 commit comments

Comments
 (0)