Skip to content

Commit

Permalink
fix: wrong $data reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoray committed Jan 21, 2025
1 parent fc8c68a commit 3ccd53a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/EndpointCollection/PaymentEndpointCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ public function delete(string $id, $data = []): ?Payment
*
* @throws ApiException
*/
public function cancel(string $id, $testmode = []): ?Payment
public function cancel(string $id, $testmode = false): ?Payment
{
$testmode = Utility::extractBool($data, 'testmode', false);
$testmode = Utility::extractBool($testmode, 'testmode', false);

/** @var null|Payment */
return $this->send((new CancelPaymentRequest($id))->test($testmode));
Expand Down

0 comments on commit 3ccd53a

Please sign in to comment.