28 lines
781 B
PHP
28 lines
781 B
PHP
<?php
|
|||
|
|
|
||
|
|
namespace Modules\Core\Payment\Events;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
||
|
|
use Modules\Core\Payment\DTOs\PaymentResult;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Dispatched by SupportsVoids::void() once a prior authorization hold has
|
||
|
|
* been released without ever settling — the "actually, never mind" exit
|
||
|
|
* from an authorize() that SupportsCaptures::capture() would otherwise
|
||
|
|
* have settled. No funds ever moved, so this is distinct from
|
||
|
|
* PaymentRefunded (which reverses money that was actually taken).
|
||
|
|
*/
|
||
|
|
class PaymentVoided
|
||
|
|
{
|
||
|
|
use Dispatchable;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @param array<string, mixed> $context
|
||
|
|
*/
|
||
|
|
public function __construct(
|
||
|
|
public readonly string $type,
|
||
|
|
public readonly PaymentResult $result,
|
||
|
|
public readonly array $context = [],
|
||
|
|
) {}
|
||
|
|
}
|