Feature: Order Service Provider, Order Events Observers
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Order\Events;
|
||||
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Lunar\Models\Order;
|
||||
use Lunar\Models\Transaction;
|
||||
|
||||
/**
|
||||
* Dispatched by TransactionObserver::saved() whenever a successful
|
||||
* type=refund Transaction row is written — every payment driver (Lunar's
|
||||
* own StripePaymentType::refund(), or a future boboko-owned driver for a
|
||||
* provider Lunar doesn't ship) creates a new row for each refund, so
|
||||
* `created` alone (filtered to type+success) is enough here, unlike
|
||||
* captures which can reuse an existing row.
|
||||
*/
|
||||
class OrderRefunded
|
||||
{
|
||||
use Dispatchable;
|
||||
|
||||
public function __construct(
|
||||
public readonly Order $order,
|
||||
public readonly Transaction $transaction,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user