private function retrieveErrorCode($body)
    {
        if (empty($body) || false === strpos($body, '<?xml')) {
            return '';
        }
        $xml = simplexml_load_string($body);
        if (isset($xml->Code)) {
            return strval($xml->Code);
        }
        return '';
    }
private function retrieveErrorCode($body)
    {
        if (empty($body) || false === strpos($body, '<?xml')) {
            return '';
        }
        $xml = simplexml_load_string($body);
        if (isset($xml->Code)) {
            return strval($xml->Code);
        }
        return '';
    }
private function retrieveErrorCode ( $ body ) { if ( empty ( $ body ) || false === strpos ( $ body , '<?xml' ) ) { return '' ; } $ xml = simplexml_load_string ( $ body ) ; if ( isset ( $ xml -> Code ) ) { return strval ( $ xml -> Code ) ; } return '' ; }
Try to get the error Code from body

@param $body
@return string
Try to get the error Code from body