|
@@ -1632,9 +1632,9 @@ class OrdersController extends Controller
|
|
|
|
|
|
protected function successPayPushMsg($uid, $product_info, $order_id)
|
|
|
{
|
|
|
+ $force_sub_info = $this->getSubscribeV2($uid);
|
|
|
+ $data = UserService::getById($uid);
|
|
|
try {
|
|
|
- $force_sub_info = $this->getSubscribeV2($uid);
|
|
|
- $data = UserService::getById($uid);
|
|
|
if (!in_array($data->distribution_channel_id, [5, 123])) {
|
|
|
//return false;
|
|
|
}
|
|
@@ -1692,7 +1692,7 @@ class OrdersController extends Controller
|
|
|
Log::info('pay_success_push error');
|
|
|
Log::info($e);
|
|
|
}
|
|
|
- $this->notifyXiyue($uid,$product_info->price);
|
|
|
+ $this->notifyXiyue($uid,$product_info->price,$data->distribution_channel_id,$data->openid);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -2066,13 +2066,14 @@ class OrdersController extends Controller
|
|
|
}catch (\Exception $e){}*/
|
|
|
}
|
|
|
|
|
|
- private function notifyXiyue($uid,$price,$type='recharge'){
|
|
|
- $xiyue_user = DB::table('xiyue_zsy_users')->where('uid',$uid)->select('openid')->first();
|
|
|
+ private function notifyXiyue($uid,$price,$channel_id,$openid,$type='recharge'){
|
|
|
+ if($channel_id != 6985) return ;
|
|
|
+ //$xiyue_user = DB::table('xiyue_zsy_users')->where('uid',$uid)->select('openid')->first();
|
|
|
$xiyue_host = env('XIYUE_HOST');
|
|
|
- if($xiyue_user && $xiyue_host){
|
|
|
+ if( $xiyue_host){
|
|
|
$client = new Client(['timeout' => 5]);
|
|
|
$url = $xiyue_host.'/order/success';
|
|
|
- $param = ['openid'=>$xiyue_user->openid,'price'=>$price];
|
|
|
+ $param = ['openid'=>$openid,'price'=>$price];
|
|
|
$param['sign'] = _sign($param,'8T5MJy4FsJoZspq8');
|
|
|
try{
|
|
|
$client->request('post',$url,['form_params'=>$param])->getBody()->getContents();
|