Commit 06923706 by 刘海龙

Merge branch 'master' of http://132.232.91.252:9999/ice/eduline

parents fd64be76 94ebe5df
......@@ -181,7 +181,7 @@ class PayAction extends CommonAction
$this->error('支付类型错误');
}
$type = intval($_POST['user_vip']);
$vip = M('user_vip')->where('id=' . $type)->find();
$vip_type_time = $_POST['vip_type_time'];
......@@ -453,8 +453,8 @@ class PayAction extends CommonAction
'uid' => intval($this->mid),
'sid' => M('user')->where(['uid'=>$this->mid])->getField('mhm_id'),
'goods_id' => intval($_POST['goods_id']),
'price' => 0,//intval($_POST['total']) - intval($fare),
'fare' => 0,//intval($fare),
'price' => $_POST['total'] - $fare,
'fare' => $fare,
'count' => intval($_POST['count']),
'address_id' => intval($_POST['address_id']),
//'lastPrice' =>intval($_POST['total'])+intval($_POST['fare']),
......@@ -630,7 +630,7 @@ class PayAction extends CommonAction
$this->assign('jumpUrl', U('classroom/Vip/index'));
}
}
//商户订单号
$out_trade_no = $_GET['out_trade_no'];
//支付宝交易号
......@@ -715,7 +715,7 @@ class PayAction extends CommonAction
$data['status'] = 1;
$data['stime'] = time();
$r_re = M('zy_recharge')->where(array('pay_pass_num' => $args['out_trade_no']))->save($data);
if (false == $r_re) {
echo json_encode(['status' => 0, 'info' => "修改购买记录状态失败"]);
M()->rollback();
......@@ -726,12 +726,12 @@ class PayAction extends CommonAction
if (!$user || $args['money'] > $user['balance']) {
echo json_encode(['status' => 0, 'info' => "你的余额不足,请及时充值"]);exit;
}
$expire = 3600*24*30*$args['time'];
if($args['expire'] == 'year'){
$expire = 3600*24*365*$args['time'];
}
if( $user['vip_type'] == $args['vip_type']){
$user['vip_expire'] = $user['vip_expire']>time()?$user['vip_expire']+$expire:time()+$expire;
}else{
......@@ -761,7 +761,7 @@ class PayAction extends CommonAction
echo json_encode(['status' => 0, 'info' => "流水添加失败"]);
M()->rollback();
}
//购买成功
if($f_re && $l_re && $r_re){
echo json_encode(['status' => 1, 'info' => "购买成功"]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment