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

master
Your Name 5 years ago
commit 1f9a8c7071

@ -359,6 +359,7 @@ class PayH5Controller extends BaseController{
$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'){
$json_data['url'] .= "?tx_client=hideopen";
// 存入pay_url 继续支付 // 存入pay_url 继续支付
M("spend", "tab_")->where([ M("spend", "tab_")->where([
'extend' => $request['extend'], 'extend' => $request['extend'],
@ -1206,7 +1207,7 @@ ADD COLUMN `pay_url` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER
if($request['code']==1){ if($request['code']==1){
$json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.urlencode(C('PAY_DOMAIN')."sdk.php/Spend/paycallback/orderno/{$request['pay_order_number']}/game_id/{$request['game_id']}/paytype/weixinpay"); $json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.urlencode(C('PAY_DOMAIN')."sdk.php/Spend/paycallback/orderno/{$request['pay_order_number']}/game_id/{$request['game_id']}/paytype/weixinpay");
$request['pay_url'] = $json_data['url']; $request['pay_url'] = $json_data['url'] . "&tx_client=hideopen";
$this->add_spend($request,1); $this->add_spend($request,1);
} }

@ -294,6 +294,11 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
} else { } else {
$this->assign("aliapp", 0); $this->assign("aliapp", 0);
} }
if(get_zfb_type() == 2) {
$this->assign("sqzfb", 1);
} else {
$this->assign("sqzfb", 0);
}
// pp($orderno); // pp($orderno);
$this->assign("orderno", $orderno); $this->assign("orderno", $orderno);
$this->assign("paytype", $paytype); $this->assign("paytype", $paytype);

@ -3227,6 +3227,43 @@ class UserController extends BaseController
exit; exit;
} }
/**
* 订单状态
*/
public function order_status() {
$request = json_decode(base64_decode(file_get_contents("php://input")), true);
if (I("debug")) {
$request['orderno'] = "SP_20191105154135nTcz";
}
if (!$request['orderno']) return ;
$pay_where = substr($orderno, 0, 2);
$map['pay_order_number'] = $orderno;
switch ($pay_where) {
case 'SP' :
$result = M('Spend', 'tab_')->field("*")->where($map)->find();
break;
case 'PF' :
$result = M('deposit', 'tab_')->field('*')->where($map)->find();
break;
case 'TB' :
$result = M('balance', 'tab_')->field('*')->where($map)->find();
break;
case 'BR' :
$result = M('bind_recharge', 'tab_')->field('*')->where($map)->find();
break;
}
// 支付成功跳转页面
if ($result['pay_status'] == 1) {
$this->new_set_message(200, "支付成功");
// $this->success("支付成功", U("userH/get_user_money", ['user_token' => $userToken]));
} else {
$this->new_set_message(0, "支付失败");
}
}
} }

@ -17,7 +17,7 @@
<input type="hidden" name="gopay_url" class="gopay_url" value='{$gopay_url}'> <input type="hidden" name="gopay_url" class="gopay_url" value='{$gopay_url}'>
<input type="hidden" name="gopay" class="gopay" value="{$gopay}"> <input type="hidden" name="gopay" class="gopay" value="{$gopay}">
<input type="hidden" name="aliapp" class="aliapp" value="{$aliapp}"> <input type="hidden" name="aliapp" class="aliapp" value="{$aliapp}">
<input type="hidden" name="sqzfb" class="sqzfb" value="{$sqzfb}">
<!-- <div class="close" onclick="javascript:history.go(-1);"> <!-- <div class="close" onclick="javascript:history.go(-1);">
<a href="javascript:"> <a href="javascript:">
@ -36,14 +36,13 @@
<eq name="paytype" value="weixinpay"> <eq name="paytype" value="weixinpay">
<a href="{$gopay_url}" style="background:url('__IMG__/callback/btn1.png') no-repeat center center/100% 100%;"> <a href="{$gopay_url}" style="background:url('__IMG__/callback/btn1.png') no-repeat center center/100% 100%;">
继续支付</a> 继续支付</a>
</eq> </eq>
<eq name="paytype" value="alipay"> <eq name="paytype" value="alipay">
<a id="alipay" data-url='{$gopay_url}' style="background:url('__IMG__/callback/btn1.png') no-repeat center center/100% 100%;"> <a id="alipay" data-url='{$gopay_url}' style="background:url('__IMG__/callback/btn1.png') no-repeat center center/100% 100%;">
继续支付 继续支付
</a> </a>
</eq> </eq>
</div> </div>
<div class="btn2"> <div class="btn2">
@ -73,6 +72,10 @@ $(function() {
} }
}); });
if ($("#.sqzfb").val() == 1) {
window.txyxsdk.sqzfbcallback($('.orderno').val());
}
$("#payed").click(function() { $("#payed").click(function() {
var orderno=$('.orderno').val(); var orderno=$('.orderno').val();

@ -62,11 +62,11 @@
$(function() { $(function() {
$("#pay").click(function() { $("#pay").click(function() {
if (!$("#money").val()) { if ($("#money").val() == '') {
showerror("金额不能为空"); showerror("金额不能为空");
return ; return ;
} }
if (!$("#money").val() <= 0) { if ($("#money").val() < 0 || $("#money").val() == 0) {
showerror("金额有误"); showerror("金额有误");
return ; return ;
} }

Loading…
Cancel
Save