22 lines
653 B
PHP
22 lines
653 B
PHP
<?php
|
|
|
|
namespace Modules\Core\Checkout\Events;
|
|
|
|
use Lunar\Models\Order;
|
|
|
|
/**
|
|
* Dispatched by CheckoutService::placeOrder() the moment an Order exists —
|
|
* the handoff point between Checkout and Order (see docs/checkout.md's
|
|
* "Three-stage lifecycle"). Checkout has no opinion about what happens
|
|
* after this fires; Order's own listeners (not built yet — Order is a
|
|
* named-but-unscoped concern, same status Recovery had before it existed)
|
|
* would be what reacts to it — e.g. a confirmation email, initializing
|
|
* order status tracking.
|
|
*/
|
|
class OrderPlaced
|
|
{
|
|
public function __construct(
|
|
public readonly Order $order,
|
|
) {}
|
|
}
|