where(['order_no' => $orderNo])->find(); if (empty($order)) throw new Exception("订单不存在"); if ($order['status'] !== 2) throw new Exception("不可发起支付"); // 创建支付行为 $this->createPaymentAction($orderNo, $payTitle, $payAmount); // 更新支付行为 $this->updatePaymentAction($orderNo, CodeExtend::uniqidDate(20), $payAmount, '无需支付'); return ['code' => 1, 'info' => '订单无需支付']; } }