app->db->name('ShopOrder')->where(['order_no' => $orderNo])->find(); if (empty($order)) throw new Exception("订单不存在"); if ($order['status'] !== 2) throw new Exception("不可发起支付"); $this->updateOrder($orderNo, CodeExtend::uniqidDate(20), $paymentAmount, '支付凭证'); return ['info' => '支付凭证上传成功!', 'status' => 1]; } }