From ca07bd58a885efa0b9a7341426d9ea7d652c9fa8 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Thu, 21 Mar 2024 10:28:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=85=B3=E9=97=AD=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=AF=86=E7=A0=81=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repositories/store/order/StoreOrderRepository.php | 6 +++--- app/controller/api/store/order/StoreOrder.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 3ea5fa44..8993feeb 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -124,10 +124,10 @@ class StoreOrderRepository extends BaseRepository if (in_array($type, ['balance', 'merBalance'])) { if (empty($user['withdrawal_pwd'])) { throw new ValidateException('请设置支付密码'); - } elseif ($this->transPwd) { - throw new ValidateException('请输入支付密码'); + } elseif (empty($this->transPwd)) { +// throw new ValidateException('请输入支付密码'); } elseif (!password_verify((string)$this->transPwd, $user['withdrawal_pwd'])) { - throw new ValidateException('支付密码错误'); +// throw new ValidateException('支付密码错误'); } } if ($type === 'balance') { diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index f2256745..d2f45679 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -260,6 +260,7 @@ class StoreOrder extends BaseController } try { + $this->repository->transPwd = $this->request->post('withdrawal_pwd'); return $this->repository->pay($type, $this->request->userInfo(), $groupOrder, $this->request->param('return_url'), $this->request->isApp()); } catch (\Exception $e) { return app('json')->status('error', $e->getMessage(), ['order_id' => $groupOrder->group_order_id]);