src/Adyen/Service/AbstractResource.php
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);
	}
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);
	}
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 ) ; }
Do the request to the Http Client

@param $params
@return mixed
@throws \Adyen\AdyenException
Do the request to the Http Client