Merge branch 'dev' of 47.111.118.107:/srv/git/sdk into dev

master
Your Name 5 years ago
commit 6c27cb7d7d

@ -153,7 +153,7 @@ class AppleController extends BaseController{
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);
$data = array("orderInfo" => base64_encode($data['arg']), "out_trade_no" => $data['out_trade_no'], "order_sign" => $data['sign'], "md5_sign" => $md5_sign, "code" => 1);
echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>json_encode($data),'wap'=>0]]);exit;
}
@ -489,7 +489,7 @@ class AppleController extends BaseController{
echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>json_encode($data),'wap'=>0]]);exit;
$request['pay_way'] = 12; // 双乾微信小程序
$request['pay_way'] = C("PAY_WAY.SQ_SMALL_PROGRAM"); // 双乾微信小程序
if($request['code']==1){
$this->add_spend($request,1);
}else{

@ -47,6 +47,7 @@ class PayH5Controller extends BaseController{
$request['price'] = $price;
$request['pay_order_number'] = 'PF_'.date('Ymd').date('His').sp_random_string(4);
}
$price = round($price, 2);
if($price <= 0){
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'充值金额有误', 'user_token' => $this->userToken)));exit;
}
@ -70,16 +71,18 @@ 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('request.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));
$request['title'] = "平台币充值"; //$request['price'];
$request['body'] = "平台币充值";
$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);
$data = array("orderInfo" => base64_encode($data['arg']), "out_trade_no" => $data['out_trade_no'], "order_sign" => $data['sign'], "md5_sign" => $md5_sign, "code" => 0);
echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>json_encode($data),'wap'=>0]]);exit;
}

@ -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();
}
}

@ -29,7 +29,7 @@
<div class="boxshadow countbox-content">
<p>账户平台币</p>
<p>{$balance}</p>
<p><a href="{:U('platform_pay_show', ['user_token' => $user_token])}" class="borderitem">立即充值</a> </p>
<p><a href="{:U('platform_pay_show', ['user_token' => $user_token, 'game_id' => $game_id])}" class="borderitem">立即充值</a> </p>
</div>
</div>
<!--绑币列表--->

@ -42,7 +42,7 @@
</p>
</a>
<a id="alipaybtn" href="javascript:;" data-url="{:U('PayH5/platform_alipay_pay', array('price' => $money, 'user_token' => I('user_token')))}" class="weui-grid js_grid">
<a id="alipaybtn" href="javascript:;" data-url="{:U('PayH5/platform_alipay_pay', array('price' => $money, 'user_token' => I('user_token'), 'game_id' => $game_id))}" class="weui-grid js_grid">
<div class="weui-grid__icon">
<img src="__IMG__/alipay.png" alt="">
</div>

@ -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/{$user_token}/game_id/{$game_id}/money/"+money+"?action=pay"
});
});
</script>

Loading…
Cancel
Save