Butik
Search…
Events
Statamic butik does dispatch evens on certain actions, so you can easily hook into them, if you want to extend butik.

How to hook into events

Available events

Those events are available at the moment:

Order Authorized

Jonassiewertsen\StatamicButik\Events\OrderAuthorized
Will be dispatched if a payment has been authorized, if using Klarna for example.
1
public function handle(OrderAuthorized $event)
2
{
3
$event->order;
4
}
Copied!

Order Canceled

Jonassiewertsen\StatamicButik\Events\OrderCanceled
Will be dispatched if a payment has been canceled. For example after expiring, if not paid.
1
public function handle(OrderCanceled $event)
2
{
3
$event->order;
4
}
Copied!

Order Completed

Jonassiewertsen\StatamicButik\Events\OrderCompleted
Will be dispatched if a payment has been fully completed.
With Mollie this is the case, after all items has been paid & shipped.
1
public function handle(OrderCompleted $event)
2
{
3
$event->order;
4
}
Copied!

Order Created

Jonassiewertsen\StatamicButik\Events\OrderCreated
Will be dispatched right after an order has been created.
1
public function handle(OrderCreated $event)
2
{
3
$event->order;
4
}
Copied!

Order Expired

Jonassiewertsen\StatamicButik\Events\OrderExpired
Will be dispatched if a payment did expire.
1
public function handle(OrderExpired $event)
2
{
3
$event->order;
4
}
Copied!

Order Paid

Jonassiewertsen\StatamicButik\Events\OrderPaid
Will be dispatched after the order has been paid.
1
public function handle(OrderPaid $event)
2
{
3
$event->order;
4
}
Copied!
Last modified 1yr ago