public function doRequest(Request $request)
	{
		$response = $this->getIo()->call($request);
		if (!$response) {
			// cURL error
			throw new HttpException('Request failed');
		} else if (isset($response->data['errors'])) {
			// GoPay errors
			$error = $response->data['errors'][0];
			throw new HttpException(HttpException::format($error), $error->error_code);
		}

		return $response;
	}