From cb8f4be97d3cdc4199d5e9ed6502b04fa13856a7 Mon Sep 17 00:00:00 2001 From: mattoid Date: Sun, 30 Jun 2024 19:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=89=8D=E7=BD=AE?= =?UTF-8?q?=E3=80=81=E5=90=8E=E7=BD=AE=E5=87=BA=E6=9D=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controller/BuyGoodsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/BuyGoodsController.php b/src/Controller/BuyGoodsController.php index 9e5b83b..592df23 100644 --- a/src/Controller/BuyGoodsController.php +++ b/src/Controller/BuyGoodsController.php @@ -117,8 +117,8 @@ protected function data(ServerRequestInterface $request, Document $document) { $after = StoreExtend::getAfter($store->code); if ($after) { // 商品处理失败,通知购买失败事件进行回滚操作 - if (!$after->after($actor, $store, $params)) { - $this->events->dispatch(new StoreBuyFailEvent($user, $store, $cart, $params, $this->translator, $this->settings, $this->events, $this->cache)); + if (!$after->after($actor, $store, $params, $this->translator, $this->settings, $this->events, $this->cache)) { + $this->events->dispatch(new StoreBuyFailEvent($user, $store, $cart, $params)); throw new ValidationException(['message' => $this->translator->trans('mattoid-store.forum.error.buy-goods-fail', ['title' => $store->title])]); } }