mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-10-19 08:53:44 +08:00
优化插件管理逻辑
This commit is contained in:
@@ -223,14 +223,14 @@ class PayController
|
||||
if ($config === false) return json(['code' => 4, 'msg' => '监听收款配置错误']);
|
||||
// 登陆账号
|
||||
$pay_config = ['username' => $config['account'], 'password' => $config['password']];
|
||||
// 收款查询
|
||||
$query = $config['query'];
|
||||
// 配置参数
|
||||
$params = $config['params'];
|
||||
// 实例监听客户端
|
||||
$payclient_name = $config['payclass'];
|
||||
$payclient_path = "\\payclient\\{$payclient_name}";
|
||||
$Payclient = new $payclient_path($pay_config);
|
||||
// 获取支付明细
|
||||
$records = $Payclient->getOrderInfo($query);
|
||||
$records = $Payclient->getOrderInfo($params);
|
||||
if ($records['code'] === 0) {
|
||||
// 提交收款记录
|
||||
$upres = $this->payHeart($records['data'], $config);
|
||||
|
@@ -163,13 +163,13 @@ class PayManageController extends BaseController
|
||||
// 登陆账号
|
||||
$pay_config = ['username' => $config['account'], 'password' => $config['password']];
|
||||
// 收款查询
|
||||
$query = $config['query'];
|
||||
$params = $config['params'];
|
||||
// 实例监听客户端
|
||||
$payclient_name = $config['payclass'];
|
||||
$payclient_path = "\\payclient\\{$payclient_name}";
|
||||
$Payclient = new $payclient_path($pay_config);
|
||||
// 获取支付明细
|
||||
$records = $Payclient->getOrderInfo($query);
|
||||
$records = $Payclient->getOrderInfo($params);
|
||||
if ($records['code'] === 0) {
|
||||
// 收款流水
|
||||
return json(backMsg(0, '查询成功', $records['data']));
|
||||
|
@@ -34,7 +34,6 @@ class PayAccount extends BaseModel
|
||||
$platform = PluginController::getPluginInfo($aid_info->getData('platform'));
|
||||
// 查询参数
|
||||
$params = json_decode($aid_info->params, true);
|
||||
$query = array_merge($platform['query'], $params);
|
||||
if ($aid_info && $platform) {
|
||||
$config = [
|
||||
'pid' => $aid_info->pid,
|
||||
@@ -48,8 +47,8 @@ class PayAccount extends BaseModel
|
||||
'account' => $aid_info->account,
|
||||
// 密码
|
||||
'password' => $aid_info->password,
|
||||
// 订单查询参数配置
|
||||
'query' => $query,
|
||||
// 配置参数
|
||||
'params' => $params,
|
||||
];
|
||||
if ($pid !== null) {
|
||||
$pid_info = User::where('pid', $pid)->find();
|
||||
|
Reference in New Issue
Block a user