From 7e515856a79dfae292abd9f22845d2a680cea106 Mon Sep 17 00:00:00 2001 From: tping Date: Mon, 28 Dec 2020 16:50:57 +0800 Subject: [PATCH] main_id cz --- .../Sdk/Controller/PayH5Controller.class.php | 16 ++++++++-------- .../Sdk/Controller/ShortcutController.class.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index eca64865..5656553d 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -74,7 +74,7 @@ class PayH5Controller extends BaseController{ exit; } $pay_conf = json_decode($pay_info['data']['config'], true); - $main_id = $pay_info['main_id']; + $main_id = $pay_info['data']['main_id']; $pay_info = $pay_info['data']; $pay_conf['id'] = $pay_info['id']; $pay_conf['merchant_id'] = $pay_info['id']; @@ -365,11 +365,11 @@ class PayH5Controller extends BaseController{ $this->other_price($request); $pay_info = get_payment_config(self::ALI_PAY, $game, $request['user_id']); - $main_id = $pay_info['main_id']; if ($pay_info['code'] != 0) { echo json_encode(['code'=>1010,'msg'=> $pay_info['msg']]); exit; } + $main_id = $pay_info['data']['main_id']; $pay_conf = json_decode($pay_info['data']['config'], true); $pay_info = $pay_info['data']; $pay_conf['id'] = $pay_info['id']; @@ -407,7 +407,7 @@ class PayH5Controller extends BaseController{ $request['spend_ip'] = get_client_ip(); $request['merchant_id'] = $pay_info['id']; $request['merchant_way'] = 1; - $request['main_id'] = $pay_conf['main_id']; + $request['main_id'] = $main_id; if($request['code']==1){ $ordercheck = M("spend","tab_")->where(array('pay_order_number'=>$request["pay_order_number"]))->find(); @@ -465,7 +465,7 @@ class PayH5Controller extends BaseController{ $request['spend_ip'] = get_client_ip(); $request['merchant_id'] = $pay_info['id']; $request['merchant_way'] = 1; - $request['main_id'] = $pay_conf['main_id']; + $request['main_id'] = $main_id; $ordercheck = M("spend","tab_")->where(array('pay_order_number'=>$request["pay_order_number"]))->find(); if ($ordercheck) { @@ -745,7 +745,7 @@ class PayH5Controller extends BaseController{ exit; } $pay_conf = json_decode($pay_info['data']['config'], true); - $main_id = $pay_conf['main_id']; + $main_id = $pay_conf['data']['main_id']; $pay_info = $pay_info['data']; $pay_conf['id'] = $pay_info['id']; $pay_conf['merchant_id'] = $pay_info['id']; @@ -763,7 +763,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; - $request['main_id'] = $pay_conf['main_id']; + $request['main_id'] = $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) { @@ -1468,7 +1468,7 @@ class PayH5Controller extends BaseController{ exit; } $pay_conf = json_decode($pay_info['data']['config'], true); - $main_id = $pay_conf['main_id']; + $main_id = $pay_conf['data']['main_id']; $pay_info = $pay_info['data']; $pay_conf['id'] = $pay_info['id']; $pay_conf['merchant_id'] = $pay_info['id']; @@ -1488,7 +1488,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; - $request['main_id'] = $pay_conf['main_id']; + $request['main_id'] = $main_id; $this->add_spend($request,1); } diff --git a/Application/Sdk/Controller/ShortcutController.class.php b/Application/Sdk/Controller/ShortcutController.class.php index 229869cb..27a484d1 100644 --- a/Application/Sdk/Controller/ShortcutController.class.php +++ b/Application/Sdk/Controller/ShortcutController.class.php @@ -591,7 +591,7 @@ class ShortcutController extends BaseController{ exit; } $pay_conf = json_decode($pay_info['data']['config'], true); - $request['main_id'] = $pay_info['main_id']; + $request['main_id'] = $pay_info['data']['main_id']; $pay_info = $pay_info['data']; $pay_conf['id'] = $pay_info['id']; $request['merchant_id'] = $pay_info['id'];