mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-09-21 03:06:39 +08:00
更新PC端监控逻辑
This commit is contained in:
parent
9080543df4
commit
b546977011
@ -450,4 +450,6 @@ V免签是一款开源免费适用于个人收款使用的收款程序,原理
|
||||
## 感谢赞助
|
||||
|姓名 | 金额 |
|
||||
|---|---|
|
||||
| 知汇学社 | 100 |
|
||||
| 知汇学社 | 100 |
|
||||
| exrock | 100 |
|
||||
| A筱磊 | 6.66 |
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user