From 86cc1900638cbf16fd6b5a83200b0dcfe2b9dfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Fri, 16 Dec 2022 16:58:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF=E4=BB=98=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/pay/PayServices.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crmeb/app/services/pay/PayServices.php b/crmeb/app/services/pay/PayServices.php index 2055ef930..d9b67663b 100644 --- a/crmeb/app/services/pay/PayServices.php +++ b/crmeb/app/services/pay/PayServices.php @@ -92,6 +92,9 @@ class PayServices return $pay->create($orderId, $price, $successAction, $body, '', ['openid' => $openid, 'isCode' => $isCode, 'pay_new_weixin_open' => (bool)sys_config('pay_new_weixin_open')]); } catch (\Exception $e) { + if (strpos($e->getMessage(), 'api unauthorized rid') !== false) { + throw new ApiException('请在微信支付配置中将小程序商户号选择改为商户号绑定'); + } throw new ApiException($e->getMessage()); } }