超级签购买测试

master
zhengchanglong 5 years ago
parent 65fd27fe36
commit 628b90b72c

@ -482,15 +482,14 @@ class SsgController extends BaseController {
))->find();
$payLog = M('game_supersign', 'tab_')->where(array(
$isPay = M('game_supersign', 'tab_')->where(array(
'user_id' => $userId,
'game_id' => $gameId
'game_id' => $gameId,
'pay_status' =>1
))->find();
if($payLog && $payLog['pay_status']==1){
//$this->assign("error","亲~您已购买过了~<br/>请到【订单查询】查看订单信息哟~");
//$this->display('blank');
redirect("/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/".$payLog['order_id']);
if($isPay){
redirect("/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/".$isPay['order_id']);
}else{
if (!$gameInfo['supersign_token']) {
//$this->error("超级签token未填写");
@ -527,27 +526,19 @@ class SsgController extends BaseController {
exit();
}
$payLog = M('game_supersign', 'tab_')->where(array(
$isPay = M('game_supersign', 'tab_')->where(array(
'user_id' => $userId,
'game_id' => $gameId
))->find();
'game_id' => $gameId,
'pay_status' => 1
))->find(); //是否有已支付订单
$gameInfo = M('game', 'tab_')->field('game_name,supersign_token')->where(array(
'id' => $gameId,
))->find();
if ($payLog && $payLog['pay_status']==0) {
$orderId = $payLog['order_id'];
}elseif ($payLog && $payLog['pay_status']==1){
/*$orderId = $payLog['order_id'];
if(stripos($_SERVER['HTTP_HOST'], '.wmtxkj.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
redirect("http://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
}else{
redirect("https://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
}*/
if ($isPay){
$this->assign("error","亲~您已购买过了~<br/>请到【订单查询】查看订单信息哟~");
$this->display('blank');
//$this->error("亲~您已购买过了~请到【订单查询】查看订单信息哟~");
exit();
} else {
$orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签

Loading…
Cancel
Save