Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions examples/efi/charges.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,12 @@
$phpay
->charge()
->find($chargeId);

/**
* confirm receipt
*
* @return array charge
*/
$phpay
->charge()
->confirmReceipt($chargeId, []);
Comment thread
mariolucasdev marked this conversation as resolved.
2 changes: 1 addition & 1 deletion src/Gateways/Efi/Resources/Charge/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function getQrCodePix(string $id): array
*/
public function confirmReceipt(string $id, array $data): array
Comment thread
mariolucasdev marked this conversation as resolved.
{
return $this->post("payments/{$id}/receiveInCash", $data);
return $this->put("v1/charge/{$id}/settle", $data);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@ public function setCustomer(array $customer): Charge;
* @return ChargeInterface
*/
public function setQueryParams(array $queryParams): ChargeInterface;

/**
* @param string $id
* @param array<mixed> $data
* @return array<array|mixed>
*/
public function confirmReceipt(string $id, array $data): array;
Comment thread
mariolucasdev marked this conversation as resolved.
}