...
|
...
|
@@ -471,15 +471,15 @@ class Pay extends Api |
|
|
if ($message['result_code'] === 'SUCCESS') {
|
|
|
if($data['status'] == 1){
|
|
|
//支付成功,更新订单状态
|
|
|
$toporder['status'] = 2;
|
|
|
$toporder['paytime'] = time();
|
|
|
$money = $data['money'];
|
|
|
$viporder['status'] = 2;
|
|
|
$viporder['paytime'] = time();
|
|
|
$money = $data['total'];
|
|
|
// 启动事务
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
Db::name('viporder')->where('num',$message['out_trade_no'])->update($toporder);
|
|
|
Db::name('viporder')->where('id',$data['id'])->update($viporder);
|
|
|
//判断用户充值金额是否大于等于8000
|
|
|
if($data['money']>=8000){
|
|
|
if($data['total']>=8000){
|
|
|
//大于等于的情况
|
|
|
$arr = Db::name('user')->where('id',$data['user_id'])->find();
|
|
|
//不是会员
|
...
|
...
|
|