-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transaction failed all the time after new update #51
Comments
Hi @akki44, do you have some more details? |
The JSON request do not represent an object. |
Can you comment the code you are using? Then i can probably help u. |
Hi @Smitsel, While I was working on my fork (for support Mollie Connect) I hitted this problem aswell [for all GET requests], the problem is in the sendRequest [AbstractMollieRequest] method protected function sendRequest($method, $endpoint, array $data = null)
{
$response = $this->httpClient->request(
$method,
$this->baseUrl . $this->apiVersion . $endpoint,
[
'Authorization' => 'Bearer ' . $this->getApiKey()
],
json_encode($data)
);
// fixed it with version below ...
$response = $this->httpClient->request(
$method,
$this->baseUrl . $this->apiVersion . $endpoint,
[
'Authorization' => 'Bearer ' . $this->getApiKey()
],
($method == 'GET') ? null : json_encode($data)
);
}
|
Thanks guys, i've created a PR for this. |
Only json_encode data when there is data. Fixes #51
Hello, after new update I am getting 404 bad request all the time. What is the exact issue?
The text was updated successfully, but these errors were encountered: