protected function retData(array $data)
    {
        if ($this->config->returnRaw) {
            $data['channel'] = Config::WX_TRANSFER;
            return $data;
        }

        // 请求失败，可能是网络
        if ($data['return_code'] != 'SUCCESS') {
            return $retData = [
                'is_success'    => 'F',
                'error' => $data['return_msg'],
                'channel' => Config::WX_TRANSFER,
            ];
        }

        // 业务失败
        if ($data['result_code'] != 'SUCCESS') {
            return $retData = [
                'is_success'    => 'F',
                'error' => $data['err_code_des'],
                'channel' => Config::WX_TRANSFER,
            ];
        }

        // 正确
        return $this->createBackData($data);
    }
protected function retData(array $data)
    {
        if ($this->config->returnRaw) {
            $data['channel'] = Config::WX_TRANSFER;
            return $data;
        }

        
        if ($data['return_code'] != 'SUCCESS') {
            return $retData = [
                'is_success'    => 'F',
                'error' => $data['return_msg'],
                'channel' => Config::WX_TRANSFER,
            ];
        }

        
        if ($data['result_code'] != 'SUCCESS') {
            return $retData = [
                'is_success'    => 'F',
                'error' => $data['err_code_des'],
                'channel' => Config::WX_TRANSFER,
            ];
        }

        
        return $this->createBackData($data);
    }
protected function retData ( array $ data ) { if ( $ this -> config -> returnRaw ) { $ data [ 'channel' ] = Config :: WX_TRANSFER ; return $ data ; } // 请求失败，可能是网络 if ( $ data [ 'return_code' ] != 'SUCCESS' ) { return $ retData = [ 'is_success' => 'F' , 'error' => $ data [ 'return_msg' ] , 'channel' => Config :: WX_TRANSFER , ] ; } // 业务失败 if ( $ data [ 'result_code' ] != 'SUCCESS' ) { return $ retData = [ 'is_success' => 'F' , 'error' => $ data [ 'err_code_des' ] , 'channel' => Config :: WX_TRANSFER , ] ; } // 正确 return $ this -> createBackData ( $ data ) ; }
处理通知的返回数据
@param array $data
@return mixed
@author helei
处理通知的返回数据