支持微信支付宝收款功能

This commit is contained in:
技术老胡
2024-11-19 17:28:42 +08:00
parent 09555fa708
commit a1707612dc
15 changed files with 426 additions and 116 deletions

View File

@@ -2,6 +2,7 @@
namespace app\controller;
use think\facade\Log;
use think\facade\View;
class IndexController
@@ -21,7 +22,17 @@ class IndexController
}
public function test()
{
$web = \request()->domain();
return $web;
$info = request()->post();
$action = isset($info['action']) ? $info['action'] : '';
if ($action === 'mpay') {
$data = json_decode($info['data'], true);
$config = \think\facade\Config::load("payconfig/{$data['pid']}_{$data['aid']}", 'payconfig');
$payclient_path = "\\payclient\\Mpay";
$Payclient = new $payclient_path($info, $config);
$res = $Payclient->notify($info);
return $res;
} else {
return 202;
}
}
}