|
|
|
@ -118,16 +118,23 @@ class Ipa365Controller extends BaseController{
|
|
|
|
|
|
|
|
|
|
$payLog = M('game_supersign', 'tab_')->where(array(
|
|
|
|
|
'user_id' => $userId,
|
|
|
|
|
'game_id' => $gameId,
|
|
|
|
|
'pay_status' => 0
|
|
|
|
|
'game_id' => $gameId
|
|
|
|
|
))->find();
|
|
|
|
|
|
|
|
|
|
$gameInfo = M('game', 'tab_')->field('game_name,supersign_token')->where(array(
|
|
|
|
|
'id' => $gameId,
|
|
|
|
|
))->find();
|
|
|
|
|
|
|
|
|
|
if ($payLog) {
|
|
|
|
|
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']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
|
|
|
|
|
}else{
|
|
|
|
|
redirect("https://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
|
|
|
|
|
}
|
|
|
|
|
$this->error("亲~您已购买过了~请到【订单查询】查看订单信息哟~");
|
|
|
|
|
} else {
|
|
|
|
|
$orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签
|
|
|
|
|
if (!$gameInfo['supersign_token']) {
|
|
|
|
|