作者 Cool
1 个管道 的构建 通过 耗费 1 秒

支付回调修改

... ... @@ -68,6 +68,13 @@ class Pay extends Api
$update['expirationtime'] = $update['paytime'] + 86400*7;
$update['finish_status'] = 1;
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
// 创建融云用户、群组
$teacher_id = Db::name('teacher')->where('id',$order['teacher_id'])->value('user_id');
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$teacher_id);
if($rongyun_chat) {
$update['chat_id'] = $rongyun_chat['chat_id'];
$update['chat_name'] = $rongyun_chat['chat_name'];
}
} else { // 用户支付失败
$update['status']=1;
}
... ... @@ -96,7 +103,8 @@ class Pay extends Api
Db::name('coupon')->insertGetId($coupon);
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
// 创建融云用户、群组
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$order['teacher_id']);
$teacher_id = Db::name('teacher')->where('id',$order['teacher_id'])->value('user_id');
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$teacher_id);
if($rongyun_chat) {
$update['chat_id'] = $rongyun_chat['chat_id'];
$update['chat_name'] = $rongyun_chat['chat_name'];
... ... @@ -117,7 +125,8 @@ class Pay extends Api
$update['finish_status'] = 1;
Db::name('teacher')->where('id',$order['teacher_id'])->setInc('help_num');
// 创建融云用户、群组
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$order['teacher_id']);
$teacher_id = Db::name('teacher')->where('id',$order['teacher_id'])->value('user_id');
$rongyun_chat = $this->rongyun_handle($order['user_id'].','.$teacher_id);
if($rongyun_chat) {
$update['chat_id'] = $rongyun_chat['chat_id'];
$update['chat_name'] = $rongyun_chat['chat_name'];
... ...