26 lines
807 B
PHP
26 lines
807 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace Modules\Core\Payment\Contracts;
|
||
|
|
|
||
|
|
use Modules\Core\Payment\DTOs\PaymentResult;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Cancels a PRIOR SupportsAuthorization::authorize() hold WITHOUT
|
||
|
|
* settling it — the "actually, never mind" exit SupportsCaptures::capture()
|
||
|
|
* doesn't take. No funds ever moved, so this is not a refund: there is
|
||
|
|
* nothing to give back, only a hold to release early (rather than letting
|
||
|
|
* it simply expire on its own).
|
||
|
|
*
|
||
|
|
* Dispatches Modules\Core\Payment\Events\PaymentVoided or
|
||
|
|
* PaymentVoidFailed.
|
||
|
|
*/
|
||
|
|
interface SupportsVoids
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* $reference is the identifier SupportsAuthorization::authorize()
|
||
|
|
* returned for the hold being released.
|
||
|
|
*
|
||
|
|
* @param array<string, mixed> $context
|
||
|
|
*/
|
||
|
|
public function void(string $reference, array $context = []): PaymentResult;
|
||
|
|
}
|