From 3b08789df95f2b7366ac04a375e5db4d330460fb Mon Sep 17 00:00:00 2001 From: tping Date: Mon, 28 Dec 2020 14:33:06 +0800 Subject: [PATCH] main_id cz --- Application/Sdk/Controller/BaseController.class.php | 2 ++ Application/Sdk/Controller/PayH5Controller.class.php | 9 +++++++++ Application/Sdk/Controller/ShortcutController.class.php | 1 + ThinkPHP/Library/Think/Pay.class.php | 4 +++- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Application/Sdk/Controller/BaseController.class.php b/Application/Sdk/Controller/BaseController.class.php index d2014d1f..95b2fe1d 100644 --- a/Application/Sdk/Controller/BaseController.class.php +++ b/Application/Sdk/Controller/BaseController.class.php @@ -589,6 +589,7 @@ class BaseController extends RestController $data_spned['merchant_id'] = isset($param['merchant_id']) ? $param['merchant_id'] : 0 ; $data_spned['merchant_way'] = isset($param['merchant_way']) ? $param['merchant_way'] : 0; + $data_spned['main_id'] = isset($param['main_id']) ? $param['main_id'] : 0; return $data_spned; } @@ -624,6 +625,7 @@ class BaseController extends RestController $data_deposit['merchant_id'] = isset($param['merchant_id']) ? $param['merchant_id'] : 0 ; $data_deposit['merchant_way'] = isset($param['merchant_way']) ? $param['merchant_way'] : 0; + $data_deposit['main_id'] = isset($param['main_id']) ? $param['main_id'] : 0; return $data_deposit; } diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index 5e4d624f..7a4d45be 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -78,6 +78,7 @@ class PayH5Controller extends BaseController{ $pay_conf['id'] = $pay_info['id']; $pay_conf['merchant_id'] = $pay_info['id']; $pay_conf['merchant_way'] = self::ALI_PAY; + $pay_conf['main_id'] = $pay_info['main_id']; if ($pay_info['channel'] == 1) { // 支付宝官方 @@ -112,6 +113,7 @@ class PayH5Controller extends BaseController{ $request['id'] = $pay_info['id']; $request['merchant_id'] = $pay_info['id']; $request['merchant_way'] = 1; + $pay_conf['main_id'] = $pay_info['main_id']; $this->add_deposit($request, 1); $sqpay=new Sqpay(); @@ -371,6 +373,7 @@ class PayH5Controller extends BaseController{ $pay_conf['id'] = $pay_info['id']; $pay_conf['merchant_id'] = $pay_info['id']; $pay_conf['merchant_way'] = self::ALI_PAY; + $pay_conf['main_id'] = $pay_info['main_id']; if ($pay_info['channel'] == 1) { // 支付宝官方 // $game_set_data = get_game_set_info($request['game_id']); $request['apitype'] = "alipay"; @@ -402,6 +405,7 @@ class PayH5Controller extends BaseController{ $request['spend_ip'] = get_client_ip(); $request['merchant_id'] = $pay_info['id']; $request['merchant_way'] = 1; + $pay_conf['main_id'] = $pay_info['main_id']; if($request['code']==1){ $ordercheck = M("spend","tab_")->where(array('pay_order_number'=>$request["pay_order_number"]))->find(); @@ -459,6 +463,7 @@ class PayH5Controller extends BaseController{ $request['spend_ip'] = get_client_ip(); $request['merchant_id'] = $pay_info['id']; $request['merchant_way'] = 1; + $pay_conf['main_id'] = $pay_info['main_id']; $ordercheck = M("spend","tab_")->where(array('pay_order_number'=>$request["pay_order_number"]))->find(); if ($ordercheck) { @@ -742,6 +747,7 @@ class PayH5Controller extends BaseController{ $pay_conf['id'] = $pay_info['id']; $pay_conf['merchant_id'] = $pay_info['id']; $pay_conf['merchant_way'] = self::WX_PAY; + $pay_conf['main_id'] = $pay_info['main_id']; //0 官方 1威富通 2俊付通 // if (get_wx_pay_type() == 0) { @@ -754,6 +760,7 @@ class PayH5Controller extends BaseController{ $request['pay_url'] = $json_data['url']."&tx_client=hideopen"; $request['merchant_id'] = $pay_info['id']; $request['merchant_way'] = self::WX_PAY; + $pay_conf['main_id'] = $pay_info['main_id']; $this->add_deposit($request, 1); // .(is_ssl()?'https%3A%2F%2F':'http%3A%2F%2F'). $_SERVER ['HTTP_HOST'] . "%2Fsdk.php%2FSpend%2Fpay_success%2Forderno%2F".$request['pay_order_number'].'%2Fgame_id%2F'.$request['game_id'] ; /* if (I('request.api_ver') == 1) { @@ -1462,6 +1469,7 @@ class PayH5Controller extends BaseController{ $pay_conf['id'] = $pay_info['id']; $pay_conf['merchant_id'] = $pay_info['id']; $pay_conf['merchant_way'] = self::WX_PAY; + $pay_conf['main_id'] = $pay_info['main_id']; //0 官方 1威富通 2俊付通 // if (get_wx_pay_type() == 0) { @@ -1476,6 +1484,7 @@ class PayH5Controller extends BaseController{ $request['pay_url'] = $json_data['url'] . "&tx_client=hideopen"; $request['merchant_id'] = $pay_info['id']; $request['merchant_way'] = self::WX_PAY; + $pay_conf['main_id'] = $pay_info['main_id']; $this->add_spend($request,1); } diff --git a/Application/Sdk/Controller/ShortcutController.class.php b/Application/Sdk/Controller/ShortcutController.class.php index 8b5231e7..05a1f595 100644 --- a/Application/Sdk/Controller/ShortcutController.class.php +++ b/Application/Sdk/Controller/ShortcutController.class.php @@ -595,6 +595,7 @@ class ShortcutController extends BaseController{ $pay_conf['id'] = $pay_info['id']; $request['merchant_id'] = $pay_info['id']; $request['merchant_way'] = PayH5Controller::EXPRESS_PAY; + $request['main_id'] = $pay_info['main_id']; $yeepay = new Yeepay(); $data['appKey'] = $pay_conf['key'];//C('yeepay.key'); diff --git a/ThinkPHP/Library/Think/Pay.class.php b/ThinkPHP/Library/Think/Pay.class.php index fb0fe958..2ad7bcf1 100644 --- a/ThinkPHP/Library/Think/Pay.class.php +++ b/ThinkPHP/Library/Think/Pay.class.php @@ -406,6 +406,7 @@ class Pay } $spend_data['merchant_id'] = isset($payConf['merchant_id']) ? $payConf['merchant_id'] : 0; $spend_data['merchant_way'] = isset($payConf['merchant_way']) ? $payConf['merchant_way'] : 0; + $spend_data['main_id'] = isset($payConf['main_id']) ? $payConf['main_id'] : 0; $result = $spend->add($spend_data); return $result; } @@ -448,7 +449,8 @@ class Pay } */ $deposit_data['merchant_id'] = isset($payConf['merchant_id']) ? $payConf['merchant_id'] : 0; $deposit_data['merchant_way'] = isset($payConf['merchant_way']) ? $payConf['merchant_way'] : 0; - + $deposit_data['main_id'] = isset($payConf['main_id']) ? $payConf['main_id'] : 0; + $result = $deposit->add($deposit_data); return $result; }