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;
	}
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;
	}
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 ; }
Take request and execute him

@param Request $request
@return Response
Take request and execute him