diff --git a/examples/open-finance/payment/ofDevolutionPix.php b/examples/open-finance/devolution/ofDevolutionPix.php similarity index 81% rename from examples/open-finance/payment/ofDevolutionPix.php rename to examples/open-finance/devolution/ofDevolutionPix.php index 728291b..4880ef2 100644 --- a/examples/open-finance/payment/ofDevolutionPix.php +++ b/examples/open-finance/devolution/ofDevolutionPix.php @@ -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("
" . json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . ""); } catch (GerencianetException $e) { diff --git a/src/Gerencianet/Gerencianet.php b/src/Gerencianet/Gerencianet.php index 1682e9d..d2ddd6f 100644 --- a/src/Gerencianet/Gerencianet.php +++ b/src/Gerencianet/Gerencianet.php @@ -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 diff --git a/src/Gerencianet/config.json b/src/Gerencianet/config.json index f65aa69..5b320e1 100755 --- a/src/Gerencianet/config.json +++ b/src/Gerencianet/config.json @@ -391,7 +391,7 @@ "method": "post" }, "ofDevolutionPix": { - "route": "/open-finance/devolucao/pagamento/pix", + "route": "/open-finance/pagamentos/pix/:identificadorPagamento/devolver", "method": "post" }, "ofListPixPayment": {