diff --git a/src/Message/Request/AbstractMollieRequest.php b/src/Message/Request/AbstractMollieRequest.php index d66d7ae..77f5579 100755 --- a/src/Message/Request/AbstractMollieRequest.php +++ b/src/Message/Request/AbstractMollieRequest.php @@ -72,7 +72,7 @@ protected function sendRequest($method, $endpoint, array $data = null) [ 'Authorization' => 'Bearer ' . $this->getApiKey() ], - json_encode($data) + ($data === null) ? null : json_encode($data) ); return json_decode($response->getBody(), true);