mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2026-09-03 05:14:07 +08:00
支持微信支付宝收款功能
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user