|
|
|
@ -234,6 +234,8 @@ class SpendController extends Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* ALTER TABLE `tab_deposit`
|
|
|
|
|
ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
|
|
|
|
|
* 支付中转页
|
|
|
|
|
*/
|
|
|
|
|
public function paycallback() {
|
|
|
|
@ -242,6 +244,7 @@ class SpendController extends Controller {
|
|
|
|
|
$pay_where = substr($orderno, 0, 2);
|
|
|
|
|
$Scheme = file_get_contents("./Application/Sdk/Scheme/" . $_GET ['game_id'] . ".txt");
|
|
|
|
|
$map ['pay_order_number'] = $orderno;
|
|
|
|
|
$type = I('request.type', 0); // 1 直接唤起支付
|
|
|
|
|
switch ($pay_where) {
|
|
|
|
|
case 'SP' :
|
|
|
|
|
$result = M('Spend', 'tab_')->field ("pay_status")->where ($map)->find();
|
|
|
|
@ -257,10 +260,21 @@ class SpendController extends Controller {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
// 微信 支付宝 快捷
|
|
|
|
|
if ($result['pay_way'] == C('PAY_WAY.WEIXIN') || $result['pay_way'] == C('PAY_WAY.WEIXIN_APP') || $result['pay_way'] == C('PAY_WAY.SQ_SMALL_PROGRAM'))
|
|
|
|
|
$gopayUrl = "/sdk.php/Apple/apple_weixin_pay/user_id/{$result['user_id']}/game_id/{$result['game_id']}/user_token/{$userToken}";
|
|
|
|
|
if ($result['pay_way'] == C('PAY_WAY.ALIPAY') || $result['pay_way'] == C('PAY_WAY.SQ_ALIPAY'))
|
|
|
|
|
$gopayUrl = "/sdk.php/Apple/apple_alipay_pay/user_id/{$result['user_id']}/game_id/{$result['game_id']}/user_token/{$userToken}";
|
|
|
|
|
if ($pay_where == "SP") {
|
|
|
|
|
if ($result['pay_way'] == C('PAY_WAY.WEIXIN') || $result['pay_way'] == C('PAY_WAY.WEIXIN_APP') || $result['pay_way'] == C('PAY_WAY.SQ_SMALL_PROGRAM'))
|
|
|
|
|
$gopayUrl = "/sdk.php/Apple/apple_weixin_pay/user_id/{$result['user_id']}/game_id/{$result['game_id']}/user_token/{$userToken}";
|
|
|
|
|
if ($result['pay_way'] == C('PAY_WAY.ALIPAY') || $result['pay_way'] == C('PAY_WAY.SQ_ALIPAY'))
|
|
|
|
|
$gopayUrl = "/sdk.php/Apple/apple_alipay_pay/user_id/{$result['user_id']}/game_id/{$result['game_id']}/user_token/{$userToken}";
|
|
|
|
|
}
|
|
|
|
|
if ($pay_where == "PF") {
|
|
|
|
|
if ($result['pay_way'] == C('PAY_WAY.WEIXIN') || $result['pay_way'] == C('PAY_WAY.WEIXIN_APP') || $result['pay_way'] == C('PAY_WAY.SQ_SMALL_PROGRAM'))
|
|
|
|
|
$gopayUrl = "/sdk.php/PayH5/platform_weixin_pay/pay_order_number/{$result['pay_order_number']}/game_id/{$result['game_id']}/user_token/{$userToken}";
|
|
|
|
|
if ($result['pay_way'] == C('PAY_WAY.ALIPAY') || $result['pay_way'] == C('PAY_WAY.SQ_ALIPAY'))
|
|
|
|
|
$gopayUrl = "/sdk.php/PayH5/platform__alipay_pay/pay_order_number/{$result['pay_order_number']}/game_id/{$result['game_id']}/user_token/{$userToken}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->assign("type", $type);
|
|
|
|
|
$this->assign ('pay_url', $result['pay_url']);
|
|
|
|
|
$this->assign("device", $result['sdk_version']?:0);
|
|
|
|
|
$this->assign ('Scheme', $Scheme);
|
|
|
|
|
$this->assign ('gopay_url', $gopayUrl);
|
|
|
|
|