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]);