From b5469770118ea0db70e7e169327ddb4d5370e70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=80=E6=9C=AF=E8=80=81=E8=83=A1?= <1094551889@qq.com> Date: Sat, 8 Feb 2025 10:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0PC=E7=AB=AF=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- app/controller/PayController.php | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 247ac5e..9c9a339 100644 --- a/README.md +++ b/README.md @@ -450,4 +450,6 @@ V免签是一款开源免费适用于个人收款使用的收款程序,原理 ## 感谢赞助 |姓名 | 金额 | |---|---| -| 知汇学社 | 100 | \ No newline at end of file +| 知汇学社 | 100 | +| exrock | 100 | +| A筱磊 | 6.66 | \ No newline at end of file diff --git a/app/controller/PayController.php b/app/controller/PayController.php index 46205d7..db80b3e 100644 --- a/app/controller/PayController.php +++ b/app/controller/PayController.php @@ -272,14 +272,15 @@ class PayController { $info = $request->post(); $action = isset($info['action']) ? $info['action'] : ''; - if ($action !== 'mpay') return '非mpay的访问请求'; + if ($action !== 'mpay' && $action !== 'mpaypc') return '非mpay的访问请求'; $data = json_decode($info['data'], true); if (!is_array($data)) return '通知数据为空'; if (!isset($data['aid']) || !isset($data['pid'])) return 'aid和pid参数错误'; $config = PayAccount::getAccountConfig($data['aid'], $data['pid']); $payclient_path = "\\payclient\\{$config['payclass']}"; $Payclient = new $payclient_path($info, $config); - $res = $Payclient->notify(); + if ($action == 'mpay') $res = $Payclient->notify(); + if ($action == 'mpaypc') $res = $Payclient->pcNotify(); if ($res['code'] !== 0) return $res['msg']; $this->payHeart($res['data'], $config); return 200;