From f16c01f794e03fee8c4f1e8c1dd8e561c2d72ff2 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Wed, 20 Nov 2019 17:28:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=B8=81=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=94=AF=E4=BB=98=20url=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/SpendController.class.php | 12 +++++++++--- Application/Sdk/View/default/Spend/paycallback.html | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Application/Sdk/Controller/SpendController.class.php b/Application/Sdk/Controller/SpendController.class.php index 47f43037..4121cb0b 100644 --- a/Application/Sdk/Controller/SpendController.class.php +++ b/Application/Sdk/Controller/SpendController.class.php @@ -293,7 +293,9 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`; $userToken = I('user_token'); $orderno = $_GET['orderno'] == "" ? $_GET ['out_trade_no'] : $_GET ['orderno']; $pay_where = substr($orderno, 0, 2); - $Scheme = file_get_contents("./Application/Sdk/Scheme/" . $_GET ['game_id'] . ".txt"); + // $Scheme = file_get_contents("./Application/Sdk/Scheme/" . $_GET ['game_id'] . ".txt"); + $gameId = $_GET ['game_id']; + $Scheme = "txgame".$gameId; $map ['pay_order_number'] = $orderno; $paytype = I('request.paytype', 0); // 支付方式 weixinpay alipay $gopay = I('request.gopay'); @@ -354,6 +356,7 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`; $this->assign ('Scheme', $Scheme); $this->assign ('gopay', $gopay); $this->assign ('user_token', $userToken); + $this->assign ('game_id', $gameId); $this->assign ('gopay_url', $gopayUrl); $this->assign ('paystatus', $result ['pay_status']); @@ -366,6 +369,7 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`; public function order_status() { $userToken = I('user_token'); $orderno = I('orderno'); + $gameId = I('game_id'); $pay_where = substr ($orderno, 0, 2); $payStatus = 0; $table = "spend"; @@ -376,12 +380,14 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`; $table = "deposit"; } - $payStatus = M($table, "tab_")->where(['pay_order_number' => $orderno])->getField("pay_status"); + $order = M($table, "tab_")->where(['pay_order_number' => $orderno])->find(); + $payStatus = $order["pay_status"]; echo json_encode([ 'type' => $table, 'payStatus' => $payStatus?'1':'0', - 'url' => "/sdk.php/userH/get_user_money/user_token/{$userToken}" + 'game_id' => $gameId, + 'url' => "/sdk.php/userH/get_user_money/user_token/{$userToken}/game_id/{$gameId}/sdk_version/{$order['sdk_version']}api_ver/2?action=pay&nav_title=%E4%BD%99%E9%A2%9D", ]); exit(); } diff --git a/Application/Sdk/View/default/Spend/paycallback.html b/Application/Sdk/View/default/Spend/paycallback.html index 9dd1a4b6..f5e2a63c 100644 --- a/Application/Sdk/View/default/Spend/paycallback.html +++ b/Application/Sdk/View/default/Spend/paycallback.html @@ -19,6 +19,7 @@ +