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

master
chenzhi 5 years ago
commit 6bc3074fdf

@ -11,7 +11,7 @@ class BaseController extends RestController{
'Apple.apple_platform_pay','Spend.notice','Apple.apple_union_pay','WapPay.wap_shortcut_pay',
'WapPay.shortcut_pay','WapPay.android_shortcut_pay','WapPay.wap_shortcut_pay','WapPay.wap_shortcut_pay',
'Apple.apple_weixin_pay','Ipa365','User.user_login','platform_coin_deduction','get_user_money',
'file_pay','pay','GameGiftPage','UserH', 'PayH5','init_sdk',
'file_pay','pay','GameGiftPage','UserH', 'PayH5','init_sdk','order_status'
// 'test','Game.get_suspend',
];
@ -19,7 +19,7 @@ class BaseController extends RestController{
protected $noNeedToken = [
'Changyan', 'Exchange', 'FengHuoApi', 'File', 'Game', 'GameGift', 'GameNotify', 'Info', 'ios-wap-Pay',
'Jpush', 'LoginNotify', 'Notice', 'OA', 'OTP', 'OTPServer', 'Pay', 'Payios', 'PointShop', 'Spend',
'User', 'WapPay', 'Wechat', 'XinJiApi', 'Notice', 'init_sdk',
'User', 'WapPay', 'Wechat', 'XinJiApi', 'Notice', 'init_sdk', 'order_status',
// 'test',
];
protected $userId;

@ -96,6 +96,7 @@ class FengHuoApi2Controller extends GetInfoBaseController{
}
}
}
unset($data[$k]['fgame_name']);
}

@ -96,6 +96,7 @@ class FengHuoApiController extends Controller{
}
}
}
unset($data[$k]['fgame_name']);
}

@ -24,6 +24,7 @@ class PayH5Controller extends BaseController{
$this->error("用户未登入");
}
$request['user_id'] = $this->userId;
$game_id = I('request.game_id');
// 支付验证 是否让支付
$payCheck = pay_check($this->userId);
@ -67,9 +68,11 @@ class PayH5Controller extends BaseController{
//$request['callback'] = 'http://'.$_SERVER['HTTP_HOST']. "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
//$request['notifyurl'] = 'http://'.$_SERVER['HTTP_HOST']. "/callback.php/Notify/notify/apitype/alipay/method/notify";
$pay_url=$this->pay($request);
$request['pay_url'] = $pay_url['url'];
$orderno = $pay_url['out_trade_no'];
//echo $pay_url['url'];die;
// redirect($pay_url['url']);
echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>$pay_url['url'],'wap'=>1]]);exit;
// echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>$pay_url['url'],'wap'=>1]]);exit;
} else {/* app */
$game_set_data = get_game_set_info(I('request.game_id'));
$request['apitype'] = "alipay";
@ -83,10 +86,21 @@ class PayH5Controller extends BaseController{
$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, "code" => 0);
$request['pay_url'] = json_encode($data);
$orderno = $data['out_trade_no'];
echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>json_encode($data),'wap'=>0]]);exit;
//echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>json_encode($data),'wap'=>0]]);exit;
}
// 存入pay_url 继续支付
M("deposit", "tab_")->where([
'extend' => $request['extend'],
'game_id' => $request['game_id'],
'pay_order_number' => $orderno
])->save([
'pay_url' => $request['pay_url']
]);
}elseif(get_zfb_type() == 2) { // 双乾
$request['pay_way'] = C('PAY_WAY.SQ_ALIPAY');
@ -115,7 +129,18 @@ class PayH5Controller extends BaseController{
$ret = json_decode($ret, true);
$json_data['url']=$ret[0]['payURL'];
if($ret[0]['respCode'] == '000000'){
redirect($json_data['url']);
$json_data['url'] .= "?tx_client=hideopen";
// 存入pay_url 继续支付
M("deposit", "tab_")->where([
'extend' => $request['extend'],
'game_id' => $request['game_id'],
'pay_order_number' => $request["pay_order_number"]
])->save([
'pay_url' => $json_data['url']
]);
$orderno = $request['pay_order_number'];
//redirect($json_data['url']);
//echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>$json_data['url'],'wap'=>1]]);
//exit;
} else {
@ -164,6 +189,15 @@ class PayH5Controller extends BaseController{
}
}
echo json_encode(['code' => 200, 'url' => U('spend/paycallback', array(
'sdk_version' => $request['sdk_version'],
'paytype' => 'alipay',
'orderno' => $orderno,
'game_id' => $game_id,
'gopay' => 1, // 立即支付
'user_token' => $this->userToken,
))]);
exit;
}
/**
*ios移动支付

@ -306,6 +306,7 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
$this->assign("sdk_version", $result['sdk_version']?:0);
$this->assign ('Scheme', $Scheme);
$this->assign ('gopay', $gopay);
$this->assign ('user_token', $userToken);
$this->assign ('gopay_url', $gopayUrl);
$this->assign ('paystatus', $result ['pay_status']);

@ -269,8 +269,8 @@ class WapPayController extends BaseController{
'secret' => C('sqpay.key'),
));
//echo "发起支付==》".time()."<br>";
// sleep(5);
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;
} else {
// 支付失败

@ -18,6 +18,7 @@
<input type="hidden" name="gopay" class="gopay" value="{$gopay}">
<input type="hidden" name="aliapp" class="aliapp" value="{$aliapp}">
<input type="hidden" name="sqzfb" class="sqzfb" value="{$sqzfb}">
<input type="hidden" name="user_token" class="user_token" value="{$user_token}">
<!-- <div class="close" onclick="javascript:history.go(-1);">
<a href="javascript:">
@ -77,6 +78,7 @@ $(function() {
var orderno=$('.orderno').val();
var device=$('.device').val();
var Scheme=$('.Scheme').val();
var user_token = $('.user_token').val();
$.ajax({
type: "post",
@ -84,7 +86,7 @@ $(function() {
dataType: "json",
data: {
'orderno' : orderno,
'user_token' : "{:I('user_token')}",
'user_token' : user_token,
},
success: function(r) {
if (r.payStatus == '1') {

@ -81,6 +81,8 @@ $(function(){
url:url,
success:function(result) {
if(result.code==200) {
window.location.href = result.url;
return ;
var data = result.data;
if(data.wap==1) {
/* if () {

Loading…
Cancel
Save