Skip to content

Commit

Permalink
Updated method
Browse files Browse the repository at this point in the history
- Variable "valorDevolucao" changed to "valor"
- Now "identificadorPagamento" is sent as a parameter
  • Loading branch information
guilhermecotaGn committed Dec 21, 2022
1 parent d4695a5 commit 00610c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
require_once $options;
}

$params = [
"identificadorPagamento" => "urn:partcipant:00000000-0000-0000-0000-000000000000",
];

$body = [
"identificadorPagamento" => "urn:gerencianet:ea807997-9c28-47a7-8ebc-eeb672ea59f0",
"valorDevolucao" => "0.01"
"valor" => "0.01"
];

try {
$api = Gerencianet::getInstance($options);
$response = $api->ofDevolutionPix($params = [], $body);
$response = $api->ofDevolutionPix($params, $body);

print_r("<pre>" . json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "</pre>");
} catch (GerencianetException $e) {
Expand Down
2 changes: 1 addition & 1 deletion src/Gerencianet/Gerencianet.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
* @method array ofConfigDetail()
* @method array ofListParticipants(array $params)
* @method array ofStartPixPayment(array $params = [], array $body)
* @method array ofDevolutionPix(array $params = [], array $body)
* @method array ofDevolutionPix(array $params, array $body)
* @method array ofListPixPayment(array $params)
*
* API PAYMENTS
Expand Down
2 changes: 1 addition & 1 deletion src/Gerencianet/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
"method": "post"
},
"ofDevolutionPix": {
"route": "/open-finance/devolucao/pagamento/pix",
"route": "/open-finance/pagamentos/pix/:identificadorPagamento/devolver",
"method": "post"
},
"ofListPixPayment": {
Expand Down

0 comments on commit 00610c4

Please # to comment.