|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|