平台币微信支付 url跳转

master
tpingzhang 5 years ago
parent 6558af1972
commit f16c01f794

@ -293,7 +293,9 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
$userToken = I('user_token');
$orderno = $_GET['orderno'] == "" ? $_GET ['out_trade_no'] : $_GET ['orderno'];
$pay_where = substr($orderno, 0, 2);
$Scheme = file_get_contents("./Application/Sdk/Scheme/" . $_GET ['game_id'] . ".txt");
// $Scheme = file_get_contents("./Application/Sdk/Scheme/" . $_GET ['game_id'] . ".txt");
$gameId = $_GET ['game_id'];
$Scheme = "txgame".$gameId;
$map ['pay_order_number'] = $orderno;
$paytype = I('request.paytype', 0); // 支付方式 weixinpay alipay
$gopay = I('request.gopay');
@ -354,6 +356,7 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
$this->assign ('Scheme', $Scheme);
$this->assign ('gopay', $gopay);
$this->assign ('user_token', $userToken);
$this->assign ('game_id', $gameId);
$this->assign ('gopay_url', $gopayUrl);
$this->assign ('paystatus', $result ['pay_status']);
@ -366,6 +369,7 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
public function order_status() {
$userToken = I('user_token');
$orderno = I('orderno');
$gameId = I('game_id');
$pay_where = substr ($orderno, 0, 2);
$payStatus = 0;
$table = "spend";
@ -376,12 +380,14 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
$table = "deposit";
}
$payStatus = M($table, "tab_")->where(['pay_order_number' => $orderno])->getField("pay_status");
$order = M($table, "tab_")->where(['pay_order_number' => $orderno])->find();
$payStatus = $order["pay_status"];
echo json_encode([
'type' => $table,
'payStatus' => $payStatus?'1':'0',
'url' => "/sdk.php/userH/get_user_money/user_token/{$userToken}"
'game_id' => $gameId,
'url' => "/sdk.php/userH/get_user_money/user_token/{$userToken}/game_id/{$gameId}/sdk_version/{$order['sdk_version']}api_ver/2?action=pay&nav_title=%E4%BD%99%E9%A2%9D",
]);
exit();
}

@ -19,6 +19,7 @@
<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}">
<input type="hidden" name="game_id" class="game_id" value="{$game_id}">
<!-- <div class="close" onclick="javascript:history.go(-1);">
<a href="javascript:">
@ -134,6 +135,7 @@ $(function() {
var device=$('.device').val();
var Scheme=$('.Scheme').val();
var user_token = $('.user_token').val();
var game_id = $('.game_id').val();
$.ajax({
type: "post",
@ -142,6 +144,7 @@ $(function() {
data: {
'orderno' : orderno,
'user_token' : user_token,
'game_id' : game_id,
},
success: function(r) {
var u = navigator.userAgent;

Loading…
Cancel
Save