21 lines
596 B
PHP
21 lines
596 B
PHP
<?php
|
|
|
|
namespace Modules\Core\Checkout\Events;
|
|
|
|
use Lunar\Models\Cart;
|
|
|
|
/**
|
|
* Dispatched by CheckoutService::selectPaymentMethod() — carries the plain
|
|
* type key (e.g. 'cash-on-delivery', 'stripe'), same convention as
|
|
* CartService's events (a plain reference the listener resolves further
|
|
* itself, rather than an already-resolved object) since a payment type key
|
|
* has nothing further to eagerly resolve the way a ShippingOption does.
|
|
*/
|
|
class PaymentMethodSelected
|
|
{
|
|
public function __construct(
|
|
public readonly Cart $cart,
|
|
public readonly string $type,
|
|
) {}
|
|
}
|