Feature: Moving Payment Methods to DB, adding fees, Transaction Updates, Refund Updates, General Updates to Payments
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Payment\Events;
|
||||
|
||||
use Modules\Core\Payment\Models\PaymentMethod;
|
||||
|
||||
class PaymentMethodCreated
|
||||
{
|
||||
public function __construct(
|
||||
public readonly PaymentMethod $method,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Payment\Events;
|
||||
|
||||
class PaymentMethodDeleted
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed> $method Snapshot of the deleted row —
|
||||
* already gone from the database by dispatch time, so this can't be
|
||||
* a fresh PaymentMethod model instance.
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly array $method,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Payment\Events;
|
||||
|
||||
use Modules\Core\Payment\Models\PaymentMethod;
|
||||
|
||||
class PaymentMethodUpdated
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed> $old Snapshot of the changed attributes
|
||||
* before the update.
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly PaymentMethod $method,
|
||||
public readonly array $old,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Payment\Events;
|
||||
|
||||
class PaymentMethodsReordered
|
||||
{
|
||||
/**
|
||||
* @param array<int, int> $ids PaymentMethod ids, in their new order —
|
||||
* the same array Filament's own reorderTable() already wrote to the
|
||||
* database directly (bulk SQL, not PaymentMethodService::update() —
|
||||
* see PaymentMethodResource's own docblock for why this is the one
|
||||
* PaymentMethod write that doesn't go through the service).
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly array $ids,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user