Feature: Adding Checkout Services and Events
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?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,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user