Skip to content

Commit

Permalink
Merge pull request #763 from mollie/feat/add-release-authorization-en…
Browse files Browse the repository at this point in the history
…dpoint

Feat/add release authorization endpoint
  • Loading branch information
Naoray authored Feb 11, 2025
2 parents 2a90a92 + 2c67a8f commit a841132
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Endpoints/PaymentEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,21 @@ public function refund(Payment $payment, $data = [])

return ResourceFactory::createFromApiResult($result, new Refund($this->client));
}

/**
* Release the authorization for the given payment.
*
* @param Payment|string $paymentId
*
* @return \stdClass
* @throws ApiException
*/
public function releaseAuthorization($paymentId)
{
$paymentId = $paymentId instanceof Payment ? $paymentId->id : $paymentId;

$resource = "{$this->getResourcePath()}/" . urlencode($paymentId) . "/release-authorization";

return $this->client->performHttpCall(self::REST_CREATE, $resource);
}
}

0 comments on commit a841132

Please sign in to comment.