diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index 677a73bc..ee339cd2 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -706,7 +706,7 @@ class OrderService */ public function paySuccess(string $sn, array $params = []): void { - $order = Order::where('sn', $sn)->findOrFail(); + $order = Order::where('sn', $sn)->firstOrFail(); if (! $order->isPending()) { throw new BizException('订单状态不是待支付');