0
ERROR RETURNED
The GET method is not supported for this route. Supported methods: post.
MY ROUTE
Route::post('/boleto-create', function () {
$data = array(
'amount' => 1,
'due_date' => '2019-08-03',
'customer_document_number' => ' "1"',
'description' => "",
'discount_type' => '"auto"',
'discount_limit_date' => null,
'discount_value' => null,
'discount_percentage' => null,
'payer' => [
'person_type' => 'individual',
'name' => "Mony",
'cnpj_cpf' => '25411417260',
'email' => '[email protected]',
'phone_number' => "",
'zipcode' => '29090630',
'address' => 'Rua Alan Turing',
'neighborhood' => 'Bairro das Laranjeiras',
'address_number' => 42,
'address_complement' => '2o andar',
'city_name' => 'Vitória',
'state' => 'ES'
]
);
$client = new GuzzleHttp\Client;
$response = $client->request(
'POST',
'https://api.padmoney.com/v2/bank_billets/',
[
'form_params' => [
$data,
],
'headers' => [
],
'decode_content' => false,
]
);
return $response->getBody()->getContents();
});