快捷支付

master
tpingzhang 5 years ago
parent 6de5ed4da2
commit 4443f2f2f7

@ -386,4 +386,30 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
exit();
}
public function shortcut_notice() {
$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" );
$map ['pay_order_number'] = $orderno;
switch ($pay_where) {
case 'SP' :
$result = M ( 'Spend', 'tab_' )->field ( "pay_status" )->where ( $map )->find ();
break;
case 'PF' :
$result = M ( 'deposit', 'tab_' )->field ( 'pay_status' )->where ( $map )->find ();
break;
case 'TB' :
$result = M ( 'balance', 'tab_' )->field ( 'pay_status' )->where ( $map )->find ();
break;
case 'BR' :
$result = M ( 'bind_recharge', 'tab_' )->field ( 'pay_status' )->where ( $map )->find ();
break;
}
$this->assign('Scheme', $Scheme);
$this->assign('status', $result['pay_status']);
$this->display();
}
}

@ -323,8 +323,8 @@ class WapPayController extends BaseController{
));
//echo "发起支付==》".time()."<br>";
if ($rsp['responseCode'] == '88') {
sleep(5);
redirect(U('Spend/pay_success',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit;
// sleep(5);
redirect(U('Spend/shortcut_notice',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit;
} else {
// 支付失败
redirect(U('Spend/pay_success',array('orderno' => $payInfo['order_id'], 'user_id'=>$param['user_id'],'game_id'=>$param['game_id'])));exit;

Loading…
Cancel
Save