|
|
|
@ -125,9 +125,16 @@ class Ipa365Controller extends BaseController{
|
|
|
|
|
))->find();
|
|
|
|
|
|
|
|
|
|
if($payLog && $payLog['pay_status']==1){
|
|
|
|
|
$this->assign("msg","亲~您已购买过了~请到【订单查询】查看订单信息哟~");
|
|
|
|
|
$this->assign("error","亲~您已购买过了~请到【订单查询】查看订单信息哟~");
|
|
|
|
|
$this->display('blank');
|
|
|
|
|
}else{
|
|
|
|
|
if (!$gameInfo['supersign_token']) {
|
|
|
|
|
//$this->error("超级签token未填写!");
|
|
|
|
|
$this->assign("error","超级签token未配置~");
|
|
|
|
|
$this->display('blank');
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->assign("price", self::signprice);
|
|
|
|
|
//$this->assign("order_id", $orderId);
|
|
|
|
|
$this->assign("game_id",$gameId);
|
|
|
|
@ -151,7 +158,10 @@ class Ipa365Controller extends BaseController{
|
|
|
|
|
$price = self::signprice;
|
|
|
|
|
|
|
|
|
|
if (!$userId || !$gameId) {
|
|
|
|
|
$this->error("参数有误!");
|
|
|
|
|
//$this->error("参数有误!");
|
|
|
|
|
$this->assign("error","参数有误~");
|
|
|
|
|
$this->display('blank');
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$payLog = M('game_supersign', 'tab_')->where(array(
|
|
|
|
@ -172,13 +182,16 @@ class Ipa365Controller extends BaseController{
|
|
|
|
|
}else{
|
|
|
|
|
redirect("https://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
|
|
|
|
|
}*/
|
|
|
|
|
$this->assign("msg","亲~您已购买过了~请到【订单查询】查看订单信息哟~");
|
|
|
|
|
$this->assign("error","亲~您已购买过了~请到【订单查询】查看订单信息哟~");
|
|
|
|
|
$this->display('blank');
|
|
|
|
|
//$this->error("亲~您已购买过了~请到【订单查询】查看订单信息哟~");
|
|
|
|
|
} else {
|
|
|
|
|
$orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签
|
|
|
|
|
if (!$gameInfo['supersign_token']) {
|
|
|
|
|
$this->error("超级签token未填写!");
|
|
|
|
|
//$this->error("超级签token未填写!");
|
|
|
|
|
$this->assign("error","超级签token未配置~");
|
|
|
|
|
$this->display('blank');
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$r = M('game_supersign', 'tab_')->add(array(
|
|
|
|
@ -219,26 +232,16 @@ class Ipa365Controller extends BaseController{
|
|
|
|
|
|
|
|
|
|
$ali_pay = $this->alipay($param);
|
|
|
|
|
redirect($ali_pay);
|
|
|
|
|
//var_dump($ali_pay);
|
|
|
|
|
}else{
|
|
|
|
|
$weixn = new Weixin();
|
|
|
|
|
$wx_pay = json_decode($weixn->weixin_pay('超级签消费', $orderId, $price, 'MWEB', 4), true);
|
|
|
|
|
if($wx_pay['status']==1){
|
|
|
|
|
redirect($wx_pay['mweb_url']);
|
|
|
|
|
}else{
|
|
|
|
|
$this->assign("error",$wx_pay['return_msg']);
|
|
|
|
|
$this->display('blank');
|
|
|
|
|
}
|
|
|
|
|
//var_dump($wx_pay);
|
|
|
|
|
//$this->assign("wxurl", $wx_pay['mweb_url']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//$this->assign("url", $ret['url']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//$this->assign("price", self::signprice);
|
|
|
|
|
//$this->assign("order_id", $orderId);
|
|
|
|
|
//$this->assign("game_name",$gameInfo['game_name']);
|
|
|
|
|
//$this->assign("callback",$param['callback']);
|
|
|
|
|
//$this->display();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|