mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-23 19:37:35 +08:00
feat: add multiple hooks, pligun schedule support ,add hook:list artisan command
This commit is contained in:
@@ -304,6 +304,7 @@ class OrderService
|
||||
public function cancel(): bool
|
||||
{
|
||||
$order = $this->order;
|
||||
HookManager::call('order.cancel.before', $order);
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
$order->status = Order::STATUS_CANCELLED;
|
||||
@@ -317,6 +318,7 @@ class OrderService
|
||||
}
|
||||
}
|
||||
DB::commit();
|
||||
HookManager::call('order.cancel.after', $order);
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
|
||||
Reference in New Issue
Block a user