private function setFaultHandler($body, $httpResponseCode, $tid){
     //If the status code is non-200
     if($httpResponseCode < 200 || $httpResponseCode >= 300){
        $this->faultHandler = new FaultHandler();
        $this->faultHandler->setHttpStatusCode($httpResponseCode);
        $this->faultHandler->setResponseBody($body);
        $this->faultHandler->setIntuitTid($tid);
        //A standard message for now.
        //TO DO: Wait V3 Team to provide different message for different response.
        $this->faultHandler->setHelpMsg("Invalid auth/bad request (got a " . $httpResponseCode . ", expected HTTP/1.1 20X or a redirect)");
        if($this->getResponseContentType() != null && strcasecmp($this->getResponseContentType(), CoreConstants::CONTENTTYPE_APPLICATIONXML) == 0){
            $this->faultHandler->parseResponse($body);
        }
     }else{
        $this->faultHandler = false;
     }
   }
private function setFaultHandler($body, $httpResponseCode, $tid){
     //If the status code is non-200
     if($httpResponseCode < 200 || $httpResponseCode >= 300){
        $this->faultHandler = new FaultHandler();
        $this->faultHandler->setHttpStatusCode($httpResponseCode);
        $this->faultHandler->setResponseBody($body);
        $this->faultHandler->setIntuitTid($tid);
        //A standard message for now.
        //TO DO: Wait V3 Team to provide different message for different response.
        $this->faultHandler->setHelpMsg("Invalid auth/bad request (got a " . $httpResponseCode . ", expected HTTP/1.1 20X or a redirect)");
        if($this->getResponseContentType() != null && strcasecmp($this->getResponseContentType(), CoreConstants::CONTENTTYPE_APPLICATIONXML) == 0){
            $this->faultHandler->parseResponse($body);
        }
     }else{
        $this->faultHandler = false;
     }
   }
private function setFaultHandler ( $ body , $ httpResponseCode , $ tid ) { //If the status code is non-200 if ( $ httpResponseCode < 200 || $ httpResponseCode >= 300 ) { $ this -> faultHandler = new FaultHandler ( ) ; $ this -> faultHandler -> setHttpStatusCode ( $ httpResponseCode ) ; $ this -> faultHandler -> setResponseBody ( $ body ) ; $ this -> faultHandler -> setIntuitTid ( $ tid ) ; //A standard message for now. //TO DO: Wait V3 Team to provide different message for different response. $ this -> faultHandler -> setHelpMsg ( "Invalid auth/bad request (got a " . $ httpResponseCode . ", expected HTTP/1.1 20X or a redirect)" ) ; if ( $ this -> getResponseContentType ( ) != null && strcasecmp ( $ this -> getResponseContentType ( ) , CoreConstants :: CONTENTTYPE_APPLICATIONXML ) == 0 ) { $ this -> faultHandler -> parseResponse ( $ body ) ; } } else { $ this -> faultHandler = false ; } }
This is used to set the detailed error coming from QuickBooks Online detail
@param String              Response Body
@param Integer             Response Status code
@param String              Intuit tid on the response header
This is used to set the detailed error coming from QuickBooks Online detail