private function parseBody($response, $httpCode)
    {
        if (!is_string($response)) {
            return;
        }

        $parsed = json_decode($response, 1);
        if (json_last_error() !== 0) {
            throw new MonetivoException('API response is malformed: ' . json_last_error_msg(), 0, $httpCode, $response);
        }

        $this->body = $parsed;
    }
private function parseBody($response, $httpCode)
    {
        if (!is_string($response)) {
            return;
        }

        $parsed = json_decode($response, 1);
        if (json_last_error() !== 0) {
            throw new MonetivoException('API response is malformed: ' . json_last_error_msg(), 0, $httpCode, $response);
        }

        $this->body = $parsed;
    }
private function parseBody ( $ response , $ httpCode ) { if ( ! is_string ( $ response ) ) { return ; } $ parsed = json_decode ( $ response , 1 ) ; if ( json_last_error ( ) !== 0 ) { throw new MonetivoException ( 'API response is malformed: ' . json_last_error_msg ( ) , 0 , $ httpCode , $ response ) ; } $ this -> body = $ parsed ; }
Parses the response to an array
@param $response
@param $httpCode
@throws MonetivoException
Parses the response to an array