public function buildUrl($apiEndPoint)
    {
        if (is_null($this->request['url'])) {
            return $apiEndPoint . '/' . $this->uri . ($this->queryStr ? '?' . http_build_query($this->queryStr) : '');
        }
        if (strpos($this->url, $apiEndPoint) !== 0) {
            throw new PaysafeException('Unexpected endpoint in url: ' . $this->url . ' expected: ' . $apiEndPoint);
        }
        return $this->url;
    }