Skip to content

Commit a841132

Browse files
authored
Merge pull request #763 from mollie/feat/add-release-authorization-endpoint
Feat/add release authorization endpoint
2 parents 2a90a92 + 2c67a8f commit a841132

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Endpoints/PaymentEndpoint.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,21 @@ public function refund(Payment $payment, $data = [])
181181

182182
return ResourceFactory::createFromApiResult($result, new Refund($this->client));
183183
}
184+
185+
/**
186+
* Release the authorization for the given payment.
187+
*
188+
* @param Payment|string $paymentId
189+
*
190+
* @return \stdClass
191+
* @throws ApiException
192+
*/
193+
public function releaseAuthorization($paymentId)
194+
{
195+
$paymentId = $paymentId instanceof Payment ? $paymentId->id : $paymentId;
196+
197+
$resource = "{$this->getResourcePath()}/" . urlencode($paymentId) . "/release-authorization";
198+
199+
return $this->client->performHttpCall(self::REST_CREATE, $resource);
200+
}
184201
}

0 commit comments

Comments
 (0)