Adjust a Guzzle PUT to receive variables

Job ID: 35612597

Budget: $10 – $30 USD

My code work when I use static values, but when change to variable return error:

$data = '{
"calendario": {
"expiracao": "3600"
},
"devedor": {
"cpf": "34723982051",
"nome": "Francisco Beltrao"
},
"valor": {
"original": "13.18"
},
"chave": "123123123123123123123123",
"solicitacaoPagador": "Serviço realizado.",
"infoAdicionais": [
{
"nome": "Campo 1",
"valor": "Informação Adicional1 do PSP-Recebedor"
}
]
}';
Related categories: PHP REST API