@brief Retrieve HTML for a Smart Form

@param mixed[] $requestParams Array of parameters to submit with GET request.
Possible array keys: "id" (required)

@return string JSON formatted response
549113
public function retrieveSmartFormHTML($requestParams)
    {
        $requiredParams = array("id");
        return $this->client->request($requestParams, $this->_mainFormEndpoint, "get", $requiredParams, $options = NULL);
    }
198525
public function request($params)
	{
		// convert to PHP Array if type is inputType is json
		if ($this->service->getClient()->getConfig()->getInputType() == 'json') {
			$params = json_decode($params, true);
			if ($params === null && json_last_error() !== JSON_ERROR_NONE) {
				$msg = 'The parameters in the request expect valid JSON but JSON error code found: ' . json_last_error();
				$this->service->getClient()->getLogger()->error($msg);
				throw new \Adyen\AdyenException($msg);
			}
		}

		if (!is_array($params)) {
			$msg = 'The parameter is not valid array';
			$this->service->getClient()->getLogger()->error($msg);
			throw new \Adyen\AdyenException($msg);
		}

		$params = $this->addDefaultParametersToRequest($params);

		$params = $this->handleApplicationInfoInRequest($params);

		$curlClient = $this->service->getClient()->getHttpClient();
		return $curlClient->requestJson($this->service, $this->endpoint, $params);
	}
365455
public static function submit($params = array()) {

        if( !is_array($params) )
        {
            throw new \InvalidArgumentException("Arguments is not a Array". print_r($params, true));
        }

        $o = '<input type="submit"';
        $o .= (isset($params['id'])) ? " id='{$params['id']}'" : '';
        $o .= (isset($params['name'])) ? " name='{$params['name']}'" : '';
        $o .= (isset($params['class'])) ? " class='{$params['class']}'" : '';
        $o .= (isset($params['onclick'])) ? " onclick='{$params['onclick']}'" : '';
        $o .= (isset($params['value'])) ? " value='{$params['value']}'" : '';
        $o .= (isset($params['disabled'])) ? " disabled='{$params['disabled']}'" : '';
        $o .= (isset($params['style'])) ? " style='{$params['style']}'" : '';
        $o .= " />\n";
        return $o;
    }
595368
public function get($url, $params = array())
    {
        $request = $this->provider->request($url, $params);
        $response = $this->client->send($request);

        $data = $response->getBody()->getContents();
        $format = $this->getFormat($params, $response);

        return $this->serializer->deserialize($data, null, $format);
    }
838347
public function get($params = null)
    {
        $curlHandle = $this->prepareGet($params);
        return $this->curlGetResponse($curlHandle);
    }
523149
public function getByIds(array $ids, array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::GET,
            ResourceMethodEnum::GET_BY_IDS,
            $params,
            $ids
        );
    }
1259630
public function form_button($params) {
        if (!isset($params['field'])) {
            throw new \UnexpectedValueException("The field parameter is required.");
        }
        $value = isset($params['value']) ? $params['value'] : null;
        $attributes = isset($params['attrs']) ? $params['attrs'] : array();
        return Form::button($params['field'], $value, $attributes);
    }
431629
public function search($searchParams = array())
    {
        $queryBuilder = $this->createQueryBuilder('e');

        if (!empty($searchParams)) {
            $searchAttributes = array(
                'recipients',
                'template',
                'sent',
                'variables',
                'token',
            );

            foreach ($searchAttributes as $attribute) {
                if (empty($searchParams[$attribute])) {
                    continue;
                }

                $attributeValue = $searchParams[$attribute];

                $queryBuilder->andWhere('e.'.$attribute.' LIKE :'.$attribute)
                    ->setParameter($attribute, '%'.$attributeValue.'%');
            }
        }

        return $queryBuilder->getQuery();
    }
627548
public function retrieveBlocksByForm($requestParams)
    {
        $requiredParams = array("name");
        return $this->client->request($requestParams, $this->_endpoint . "/" . self::FORM_BLOCKS_BY_NAME, "get", $requiredParams, $options = NULL);
    }
720674
protected function fetchResponse($params)
    {
        $qs = http_build_query($params);
        $response = file_get_contents($this->verifyUrl . '?' . $qs);

        return json_decode($response, true);
    }
277732
protected function formatOptions(array &$params)
    {
        if (!is_array($params)) {
            return $params;
        }

        foreach ($params as $param => $value) {
            $params[$param] = Html::tag('strong', '\'' . $param . '\' => ') . (string)$value;
        }

        return $params;
    }
403264
public function select( $request, $query_params = [] )
	{
		if( is_array($request) )
		{
			$template = reset($request);
			$query_params = end($request);
		}
		else if( is_string($request) )
		{
			$template = $request;
		}

		$statement = $this->_query_( $template, $query_params );

		$results = [];
		try {
			$results = $statement->fetchAll( \PDO::FETCH_ASSOC );
		} catch (PDOException $e) {
			if( DB_DEBUG_QUERY )
			{
				debug($e->getMessage());
			} 
			else
			{
				debug('Query Error');
			}
			exit;
		}

		return $results;
	}
979913
protected function getQueryParams(array $params = []): string
    {
        if (empty($params)) {
            return '';
        }
        $query = $params['query'] ?? [];
        if (is_string($query)) {
            return $query;
        }
        return empty($query) ? '' : http_build_query($query);
    }
982515
public function submit(RequestParameters $params)
    {
        /**
         * PHP 5.6.0 changed the way you specify the peer name for SSL context options.
         * Using "CN_name" will still work, but it will raise deprecated errors.
         */
        $peer_key = version_compare(PHP_VERSION, '5.6.0', '<') ? 'CN_name' : 'peer_name';
        $options = array(
            'http' => array(
                'header' => "Content-type: application/x-www-form-urlencoded\r\n",
                'method' => 'POST',
                'content' => $params->toQueryString(),
                // Force the peer to validate (not needed in 5.6.0+, but still works)
                'verify_peer' => true,
                // Force the peer validation to use www.google.com
                $peer_key => 'www.google.com',
            ),
        );
        if (null !== $this->timeout) {
            $options['http']['timeout'] = $this->timeout;
        }
        $context = stream_context_create($options);
        return file_get_contents($this->recaptchaVerifyUrl, false, $context);
    }
832708
public function input_get($params) {
        $index = isset($params['index']) ? $params['index'] : null;
        $default = isset($params['default']) ? $params['default'] : null;
        return Input::get($index, $default);
    }
592735
public function request($resourceUrl, array $params = array())
    {
        $params = array('url' => $resourceUrl) + $params;

        $url = $this->setUrlParams($this->endpoint, $params);

        $data = $this->fetchUrl($url);

        if (self::TYPE_JSON === $this->type) {
            return $this->createResponseFromJson($data);
        } else if (self::TYPE_XML === $this->type) {
            return $this->createResponseFromXml($data);
        }
    }
285457
public function getJson($url, $params = [])
    {
        $req = $this->buildRequest('GET', $url, $params);
        $req->setHeader('accept', 'application/json');
        $res = $this->exec($req);
        return $res === false ? false : $res->getJson();
    }