private function fixTaxServicePayload($entity, $content)
    {
        if ($this->isTaxServiceSafe($entity)) {
            //get first "line" to make sure we don't have TaxService in response
            $sample = substr(trim($content), 0, 20);
            $taxServiceName = self::cleanPhpClassNameToIntuitEntityName(get_class($entity));
            if (false === strpos($sample, $taxServiceName)) {
                //last attempt to verify content before
                if (0 === strpos($sample, '{"TaxCode":')) {
                    return "{\"$taxServiceName\":$content}";
                }
            }
        }

        return $content;
    }
private function fixTaxServicePayload($entity, $content)
    {
        if ($this->isTaxServiceSafe($entity)) {
            //get first "line" to make sure we don't have TaxService in response
            $sample = substr(trim($content), 0, 20);
            $taxServiceName = self::cleanPhpClassNameToIntuitEntityName(get_class($entity));
            if (false === strpos($sample, $taxServiceName)) {
                //last attempt to verify content before
                if (0 === strpos($sample, '{"TaxCode":')) {
                    return "{\"$taxServiceName\":$content}";
                }
            }
        }

        return $content;
    }
private function fixTaxServicePayload ( $ entity , $ content ) { if ( $ this -> isTaxServiceSafe ( $ entity ) ) { //get first "line" to make sure we don't have TaxService in response $ sample = substr ( trim ( $ content ) , 0 , 20 ) ; $ taxServiceName = self :: cleanPhpClassNameToIntuitEntityName ( get_class ( $ entity ) ) ; if ( false === strpos ( $ sample , $ taxServiceName ) ) { //last attempt to verify content before if ( 0 === strpos ( $ sample , '{"TaxCode":' ) ) { return "{\"$taxServiceName\":$content}" ; } } } return $ content ; }
Methods provides workaround to successfully process TaxService response
@param $entity
@param $content
@return string
Methods provides workaround to successfully process TaxService response