|
|
@ -540,14 +540,17 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
|
|
|
|
$user_token = I('request.user_token');
|
|
|
|
$user_token = I('request.user_token');
|
|
|
|
$pay_way = I('request.payway');
|
|
|
|
$pay_way = I('request.payway');
|
|
|
|
$game_id = I('request.game_id');
|
|
|
|
$game_id = I('request.game_id');
|
|
|
|
$user_id = I('request.user_id');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!$user_token) {
|
|
|
|
if (!$user_token) {
|
|
|
|
echo "access deny!";
|
|
|
|
echo "access deny!";
|
|
|
|
die();
|
|
|
|
die();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$userTokenInfo = M("user_token", "tab_")->where(array(
|
|
|
|
|
|
|
|
'user_token' => $user_token,
|
|
|
|
|
|
|
|
'game_id' => $game_id
|
|
|
|
|
|
|
|
))->getField("user_id");
|
|
|
|
|
|
|
|
$user_id = $userTokenInfo['user_id'];
|
|
|
|
// var_dump($game_id);die();
|
|
|
|
// var_dump($game_id);die();
|
|
|
|
if (!$game_id) {
|
|
|
|
if (!$game_id) {
|
|
|
|
echo json_encode(['code'=>0,'msg'=>'参数错误']);
|
|
|
|
echo json_encode(['code'=>0,'msg'=>'参数错误']);
|
|
|
@ -591,32 +594,22 @@ ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$intentionLog = $payChannelIntention->where(array(
|
|
|
|
|
|
|
|
'pay_order_number' => $pay_info['order_id']
|
|
|
|
|
|
|
|
))->count();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pay_intention_num = M('pay_intention_num','tab_')->field('num')->where(['pay_order_number' => $pay_info['order_id']])->find();
|
|
|
|
$pay_intention_num = M('pay_intention_num','tab_')->field('num')->where(['pay_order_number' => $pay_info['order_id']])->find();
|
|
|
|
|
|
|
|
|
|
|
|
if ($pay_intention_num&&$pay_intention_num['num']>9) {
|
|
|
|
if ($pay_intention_num&&$pay_intention_num['num']>9) {
|
|
|
|
// 超过十条不做记录
|
|
|
|
// 超过十条不做记录
|
|
|
|
echo json_encode(['code'=>200,'msg'=>'']);
|
|
|
|
echo json_encode(['code'=>200,'msg'=>'']);
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// $user_info = M('user','tab_')->field('account')->where(['id'=>$user_id])->find();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$insert['user_id'] = $user_id;
|
|
|
|
$insert['user_id'] = $user_id;
|
|
|
|
$insert['user_account'] = $pay_info['user_account'];
|
|
|
|
$insert['user_account'] = $pay_info['user_account'];
|
|
|
|
$insert['pay_way'] = $pay_way;
|
|
|
|
$insert['pay_way'] = $pay_way;
|
|
|
|
$insert['pay_amount'] = $pay_info['price'];
|
|
|
|
$insert['pay_amount'] = $pay_info['price'];
|
|
|
|
$insert['pay_order_number'] = $pay_info['order_id'];
|
|
|
|
$insert['pay_order_number'] = $pay_info['order_id'];
|
|
|
|
$insert['create_time'] = time();
|
|
|
|
$insert['create_time'] = time();
|
|
|
|
|
|
|
|
|
|
|
|
$is_success = M('pay_channel_intention','tab_')->add($insert);
|
|
|
|
$is_success = M('pay_channel_intention','tab_')->add($insert);
|
|
|
|
|
|
|
|
|
|
|
|
if ($is_success) {
|
|
|
|
if ($is_success) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!$pay_intention_num) {
|
|
|
|
if (!$pay_intention_num) {
|
|
|
|
M('pay_intention_num','tab_')->add(['num'=>1,'pay_order_number'=>$pay_info['order_id']]);
|
|
|
|
M('pay_intention_num','tab_')->add(['num'=>1,'pay_order_number'=>$pay_info['order_id']]);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|