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;