2026-08-29 01:14:58 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Modules\Core\Checkout\Events;
|
|
|
|
|
|
|
|
|
|
use Lunar\Models\Order;
|
|
|
|
|
|
|
|
|
|
/**
|
2026-09-03 17:27:34 +03:00
|
|
|
* Dispatched once an Order's placed_at is set — the handoff point between
|
|
|
|
|
* Checkout/Payment and Order (see docs/checkout.md's "Three-stage
|
|
|
|
|
* lifecycle"). Fired by Modules\Core\Order\Listeners\
|
|
|
|
|
* ApplyResolvedPaymentStatus once it resolves a PaymentCaptured/
|
|
|
|
|
* PaymentAuthorized event into an actual order status change, not by
|
|
|
|
|
* CheckoutService directly — a draft Order can exist (via
|
|
|
|
|
* CheckoutService::initiatePayment()) well before this fires, if payment
|
|
|
|
|
* resolves asynchronously (e.g. a redirect-based gateway). Checkout has no
|
|
|
|
|
* opinion about what happens after this fires; Order's own listeners are
|
|
|
|
|
* what react to it — e.g. a confirmation email, initializing order status
|
|
|
|
|
* tracking.
|
2026-08-29 01:14:58 +03:00
|
|
|
*/
|
|
|
|
|
class OrderPlaced
|
|
|
|
|
{
|
|
|
|
|
public function __construct(
|
|
|
|
|
public readonly Order $order,
|
|
|
|
|
) {}
|
|
|
|
|
}
|