From 7112f07212ef40e23000816ee69828c01faac3a5 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Thu, 31 Oct 2019 18:30:16 +0800 Subject: [PATCH] =?UTF-8?q?alipay=20app=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/PayH5Controller.class.php | 3 +-- Application/Sdk/Controller/UserHController.class.php | 4 ++++ Application/Sdk/View/default/UserH/get_user_money.html | 2 +- Application/Sdk/View/default/UserH/platform_pay.html | 2 +- Application/Sdk/View/default/UserH/platform_pay_show.html | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index 7d30eebc..fc11eeac 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -70,13 +70,12 @@ class PayH5Controller extends BaseController{ // redirect($pay_url['url']); echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>$pay_url['url'],'wap'=>1]]);exit; } else {/* app */ - $game_set_data = get_game_set_info($request['game_id']); + $game_set_data = get_game_set_info(I('game_id')); $request['apitype'] = "alipay"; $request['config'] = "alipay"; $request['signtype'] = "MD5"; $request['server'] = "mobile.securitypay.pay"; $request['payway'] = C("PAY_WAY.ALIPAY"); // 1 支付宝 - file_put_contents(dirname(__FILE__) .'/alipay.txt',json_encode($request)); $data = $this->alipay_app_pay($request); $md5_sign = $this->encrypt_md5(base64_encode($data['arg']), $game_set_data["access_key"]); $data = array("orderInfo" => base64_encode($data['arg']), "out_trade_no" => $data['out_trade_no'], "order_sign" => $data['sign'], "md5_sign" => $md5_sign); diff --git a/Application/Sdk/Controller/UserHController.class.php b/Application/Sdk/Controller/UserHController.class.php index ec38ca9b..71e16bd3 100644 --- a/Application/Sdk/Controller/UserHController.class.php +++ b/Application/Sdk/Controller/UserHController.class.php @@ -38,6 +38,8 @@ class UserHController extends BaseController { $deposit[$k]['create_time'] = date('Y-m-d',$v['create_time']); } + + $this->assign('game_id', I('game_id', 0)); $this->assign('account', $user_info['account']); $this->assign('balance', $user_info['balance']?:0); $this->assign('deposit', $deposit); @@ -57,6 +59,7 @@ class UserHController extends BaseController $u = M('user', 'tab_')->where(['id' => $this->userId])->find(); $this->assign("account", $u['account']); $this->assign("user_token", $u['user_token']); + $this->assign('game_id', I('game_id', 0)); $this->display(); } @@ -75,6 +78,7 @@ class UserHController extends BaseController // } $this->assign("account", $u['account']); $this->assign('money', $money/100); + $this->assign('game_id', I('game_id', 0)); $this->display(); } } \ No newline at end of file diff --git a/Application/Sdk/View/default/UserH/get_user_money.html b/Application/Sdk/View/default/UserH/get_user_money.html index a00eab68..860ff6fd 100644 --- a/Application/Sdk/View/default/UserH/get_user_money.html +++ b/Application/Sdk/View/default/UserH/get_user_money.html @@ -29,7 +29,7 @@

账户平台币

{$balance}

-

立即充值

+

立即充值

diff --git a/Application/Sdk/View/default/UserH/platform_pay.html b/Application/Sdk/View/default/UserH/platform_pay.html index 58e9c78e..f81b3f06 100644 --- a/Application/Sdk/View/default/UserH/platform_pay.html +++ b/Application/Sdk/View/default/UserH/platform_pay.html @@ -42,7 +42,7 @@

- +
diff --git a/Application/Sdk/View/default/UserH/platform_pay_show.html b/Application/Sdk/View/default/UserH/platform_pay_show.html index d1a20726..1f030b7f 100644 --- a/Application/Sdk/View/default/UserH/platform_pay_show.html +++ b/Application/Sdk/View/default/UserH/platform_pay_show.html @@ -58,7 +58,7 @@ } var money = $("#money").val(); - window.location.href = "/sdk.php/userH/platform_pay/account/{$account}/user_token/{$user_token}/money/"+money+"?action=pay" + window.location.href = "/sdk.php/userH/platform_pay/account/{$account}/user_token/game_id/{$game_id}/{$user_token}/money/"+money+"?action=pay" }); });