Skip to content
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

Bug Juros Multa e Desconto #19

Open
nuntiusdataexpert opened this issue Aug 17, 2018 · 1 comment
Open

Bug Juros Multa e Desconto #19

nuntiusdataexpert opened this issue Aug 17, 2018 · 1 comment

Comments

@nuntiusdataexpert
Copy link

Bom dia,

Estou com um bug relacionado aos Adpters nenhum deles tem suportado o formato de post exigido pelo asaas, que é um array multinivel;

"discount": {
"value": 10,
"dueDateLimitDays": 0
},
"fine": {
"value": 1
},
"interest": {
"value": 2
}

Att Éder

@nuntiusdataexpert
Copy link
Author

nuntiusdataexpert commented Aug 20, 2018

Corrigi o bug alterando o arquivo src/Adapter/BuzzAdapter.php

Substitui

 public function post($url, $content = '')
    {
        $response = $this->browser->post($url, [], $content);

        $this->handleResponse($response);

        return $response->getContent();
    }

Por

 public function post($url, $content = '')
    {
        $header[] = 'Content-Type:application/json';
        $content = json_encode($content);
        $response = $this->browser->post($url, $header, $content);

        $this->handleResponse($response);

        return $response->getContent();
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant