src/Query/Wx/WxRefundQuery.php
protected function retData(array $data)
    {
        if ($this->config->returnRaw) {
            $data['channel'] = Config::WX_REFUND;
            return $data;
        }

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

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

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

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

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

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