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

master
Your Name 5 years ago
commit 9ae22be3a9

@ -353,13 +353,23 @@ class PayH5Controller extends BaseController{
$data['mchAppName'] = "mchAppName"; $data['mchAppName'] = "mchAppName";
$data['deviceInfo'] = "AND_WAP"; $data['deviceInfo'] = "AND_WAP";
$data['clientIp'] = get_client_ip(); $data['clientIp'] = get_client_ip();
$orderno = $request['pay_order_number'];
$ret = $sqpay->sq_pay($data); $ret = $sqpay->sq_pay($data);
$ret = json_decode($ret, true); $ret = json_decode($ret, true);
$json_data['url']=$ret[0]['payURL']; $json_data['url']=$ret[0]['payURL'];
if($ret[0]['respCode'] == '000000'){ if($ret[0]['respCode'] == '000000'){
echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>$json_data['url'],'wap'=>1]]); // 存入pay_url 继续支付
exit; M("spend", "tab_")->where([
'extend' => $request['extend'],
'game_id' => $request['game_id'],
'pay_order_number' => $request["pay_order_number"]
])->save([
'pay_url' => $json_data['url']
]);
/* echo json_encode(['code'=>200,'msg'=>'','data'=>['url'=>$json_data['url'],'wap'=>1]]);
exit; */
} else { } else {
echo json_encode(['code'=>0,'msg'=>$ret[0]['respMess'],'wap'=>1]); echo json_encode(['code'=>0,'msg'=>$ret[0]['respMess'],'wap'=>1]);
exit; exit;
@ -572,7 +582,7 @@ ADD COLUMN `pay_url` text NULL AFTER `check_sign`;
$is_pay = json_decode($weixn->weixin_pay("充值", $request['pay_order_number'], $pay_amount, 'MWEB'), true); $is_pay = json_decode($weixn->weixin_pay("充值", $request['pay_order_number'], $pay_amount, 'MWEB'), true);
if($is_pay['status']==1){ if($is_pay['status']==1){
$json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.C('PAY_DOMAIN')."sdk.php/Spend/paycallback/orderno/{$request['pay_order_number']}/user_token/".$this->userToken; $json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.C('PAY_DOMAIN')."sdk.php/Spend/paycallback/orderno/{$request['pay_order_number']}/user_token/".$this->userToken."/paytype/weixinpay";
$request['pay_url'] = $json_data['url']; $request['pay_url'] = $json_data['url'];
$this->add_deposit($request, 1); $this->add_deposit($request, 1);
// .(is_ssl()?'https%3A%2F%2F':'http%3A%2F%2F'). $_SERVER ['HTTP_HOST'] . "%2Fsdk.php%2FSpend%2Fpay_success%2Forderno%2F".$request['pay_order_number'].'%2Fgame_id%2F'.$request['game_id'] ; // .(is_ssl()?'https%3A%2F%2F':'http%3A%2F%2F'). $_SERVER ['HTTP_HOST'] . "%2Fsdk.php%2FSpend%2Fpay_success%2Forderno%2F".$request['pay_order_number'].'%2Fgame_id%2F'.$request['game_id'] ;

Loading…
Cancel
Save