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

master
zhanglingsheng 5 years ago
commit 9fcf71a6a1

@ -34,7 +34,6 @@ class BaseController extends RestController{
$a = ACTION_NAME;
$data = json_decode ( base64_decode ( file_get_contents ( "php://input" ) ), true );
if (isset($data['api_ver']) && $data['api_ver'] == 2) {
if (!(in_array($c, $this->noNeedGame) || in_array($a, $this->noNeedGame) || in_array($c.".".$a, $this->noNeedGame))) {
// 解决在游戏中未退出的用户 user_token 不存在问题
$userToken = M('user', 'tab_')->where(['id' => $data['user_id']])->getField('user_token');
@ -96,56 +95,6 @@ class BaseController extends RestController{
}
}
} else { // 旧版
C(api('Config/lists'));
if(
!preg_match("/apple_alipay_pay/",GetCurUrl())
&&!preg_match("/apple_weixin_pay/",GetCurUrl())
&&!preg_match("/get_alipay_zmxy_return/",GetCurUrl())
&&!preg_match("/apple_platform_pay/",GetCurUrl())
&&!preg_match("/notice/",GetCurUrl())
&&!preg_match("/apple_union_pay/",GetCurUrl())
&&!preg_match("/test/",GetCurUrl())
&&!preg_match("/wap_shortcut_pay/",GetCurUrl())
&&!preg_match("/shortcut_pay/",GetCurUrl())
&&!preg_match("/android_shortcut_pay/",GetCurUrl())
&&!preg_match("/wap_shortcut_pay/",GetCurUrl())
&&!preg_match("/apple_weixin_pay/",GetCurUrl())
&&!preg_match("/Ipa365/",GetCurUrl())
&&!preg_match("/user_login/",GetCurUrl())
&&!preg_match("/platform_coin_deduction/",GetCurUrl())
){
$data = json_decode(base64_decode(file_get_contents("php://input")),true);
// #判断数据是否为空
if(empty($data) || empty($data['game_id'])){
echo base64_encode(json_encode(array("status"=>10,"return_msg"=>"操作数据或游戏ID不能为空")));exit();
}
$md5Sign = $data['md5_sign'];
unset($data['md5_sign']);
#获取游戏key
$game_data = M("game","tab_")->alias("g")->field("s.*")
->where(['g.apply_status'=>1,'g.id'=>$data['game_id']])
->join("left join tab_game_set s on s.game_id = g.id")
->find();
if(empty($game_data)){
$this->set_message(0,"fail","游戏不存在或未通过审核");
}
if (isset($data['openid'])) // 小程序支付增加参数
unset($data['openid']);
$md5_sign = $this->encrypt_md5($data,$game_data["access_key"]);//mengchuang DZQkkiz!@#9527
if($md5Sign !== $md5_sign){
$this->set_message(0,"fail","验签失败");
}
}
}
}

@ -386,4 +386,30 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
exit();
}
public function shortcut_notice() {
$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" );
$map ['pay_order_number'] = $orderno;
switch ($pay_where) {
case 'SP' :
$result = M ( 'Spend', 'tab_' )->field ( "pay_status" )->where ( $map )->find ();
break;
case 'PF' :
$result = M ( 'deposit', 'tab_' )->field ( 'pay_status' )->where ( $map )->find ();
break;
case 'TB' :
$result = M ( 'balance', 'tab_' )->field ( 'pay_status' )->where ( $map )->find ();
break;
case 'BR' :
$result = M ( 'bind_recharge', 'tab_' )->field ( 'pay_status' )->where ( $map )->find ();
break;
}
$this->assign('Scheme', $Scheme);
$this->assign('status', $result['pay_status']);
$this->display();
}
}

@ -323,8 +323,8 @@ class WapPayController extends BaseController{
));
//echo "发起支付==》".time()."<br>";
if ($rsp['responseCode'] == '88') {
sleep(5);
redirect(U('Spend/pay_success',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit;
// sleep(5);
redirect(U('Spend/shortcut_notice',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit;
} else {
// 支付失败
redirect(U('Spend/pay_success',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit;

@ -92,12 +92,13 @@
-->
</div>
</if>
<if condition="C('sqpay.status') eq 1 and C('sqpay.union') eq 1">
<!-- <if condition="C('sqpay.status') eq 1 and C('sqpay.union') eq 1">
<div class="recharge_cell">
<a href="{:U('Apple/apple_union_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_alipay">
<img src="__IMG__/unionpay.png"></a>
</div>
</if>
</if> -->
<if condition="pay_set_status('ptb_pay') eq 1 and $data['code'] eq 1">
<div class="recharge_cell">
@ -110,13 +111,13 @@
<a href="javascript:;" id="platform_id1" class="recharge_way_btn recharge_way_btn_platform"><img src="__IMG__/icon_bangbi@3x.png"></a>
</div>
</if>
<!--
<if condition="C('sqpay.status') eq 1 and C('sqpay.shortcut') eq 1">
<div class="recharge_cell">
<a href="{:U('WapPay/wap_shortcut_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_alipay">
<img src="__IMG__/unionpay.png"></a>
<img src="__IMG__/onlinepay.png"></a>
</div>
</if>
</if> -->
</div>

@ -11,8 +11,6 @@
<link rel="stylesheet" href="__CSS__/weui.min.css">
<script src="__JS__/flex.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.js"></script>
<script type="text/javascript" src="__JS__/libgif.js"></script>
<script type="text/javascript" src="__JS__/rubbable.js"></script>
<title>支付中心</title>
</head>
<style>
@ -173,10 +171,10 @@
border: 0px !important;
}
/* new */
canvas{
/* canvas{
width: 2.18rem;
height:2.04rem;
}
} */
</style>
@ -185,22 +183,22 @@
<!--加载提示框-->
<div class="js_dialog" id="Dialog" style="display: none">
<div class="weui-mask"></div>
<div class="weui-dialog" style="width: 4.5rem;max-width: 4.5rem;display: flex;flex-direction:column;padding-bottom: .3rem;">
<div id="close_doalog" style="width: 100%;text-align: left;height: .6rem;display: flex;">
<div class="weui-dialog" style="width: 4.5rem;max-width: 4.5rem;display: flex;flex-direction:column;padding:.4rem .2rem;">
<!-- <div id="close_doalog" style="width: 100%;text-align: left;height: .6rem;display: flex;">
<img src="__IMG__/close-black.png" style="width: .3rem;height: .3rem;margin: .3rem 0 0 .3rem;">
</div>
</div> -->
<div style="width: 100%;text-align: center;">
<img id="example2" src="__IMG__/load.gif" rel:auto_play="1" rel:rubbable="1" />
<!-- <img src="__IMG__/load.gif" style="width:2.18rem;height:2.04rem;"> -->
<img src="__IMG__/load.gif" style="width:2.18rem;height:2.04rem;">
</div>
<p style="text-align: center;font-size: .24rem;margin:auto;line-height: 1.5;color:#292929;margin-top: -.5rem;">
支付结果将在两分钟内反馈<br/>请稍后在游戏内查看
<p style="text-align: center;font-size: .24rem;margin:auto;line-height: 1.5;color:#292929;margin-top: -.3rem;">
加载中……
<!-- 支付结果将在两分钟内反馈<br/>请稍后在游戏内查看 -->
</p>
<div style="width: 100%;text-align: center;display: flex;justify-content:center;margin-top:.5rem;">
<!-- <div style="width: 100%;text-align: center;display: flex;justify-content:center;margin-top:.5rem;">
<div style="width: 3.3rem;height: .6rem;background-color: #21B1EB;color: #ffffff;font-size: .28rem;border-radius:30px;line-height: .6rem;">
返回游戏
</div>
</div>
</div> -->
</div>
</div>
<!--提醒信息弹窗-->
@ -256,8 +254,8 @@
<div
style="height: 3.1rem;background-color: #21B1EB;color: #fff;border-bottom-left-radius:30%;border-bottom-right-radius:30%;padding: .43rem .3rem .6rem;line-height: 1.5;">
<p style="font-size: .4rem;">待支付……</p>
<p style="font-size: .24rem;margin-top:.3rem;">订单超过30分钟自动取消请在20分钟18秒内完成支付</p>
<p style="font-size: .24rem;">支付结果将在两分钟内反馈,请稍后在游戏内查看</p>
<!-- <p style="font-size: .24rem;margin-top:.3rem;">订单超过30分钟自动取消请在20分钟18秒内完成支付</p> -->
<p style="font-size: .28rem;margin-top:.3rem;">支付结果将在两分钟内反馈,请稍后在游戏内查看</p>
</div>
<form id="wfform" name="wfform" method="post" action="{:U('WapPay/shortcut_pay')}" target="_parent" >
@ -327,10 +325,7 @@
</div>
</form>
</body>
<script type="text/javascript">
var sup2 = new RubbableGif({ gif: document.getElementById('example2'),progressbar_height:0 } );
sup2.load();
</script>
<script type="text/javascript">
var validCode=true;
var smsstatus = true;

Loading…
Cancel
Save