public function requestPost(\Adyen\Service $service, $requestUrl, $params)
	{
		$client = $service->getClient();
		$config = $client->getConfig();
		$logger = $client->getLogger();
		$username = $config->getUsername();
		$password = $config->getPassword();

		// log the requestUr, params and json request
		$logger->info("Request url to Adyen: " . $requestUrl);
		$logger->info('Params in request to Adyen:' . print_r($params, 1));

		//Initiate cURL.
		$ch = curl_init($requestUrl);

		//Tell cURL that we want to send a POST request.
		curl_setopt($ch, CURLOPT_POST, 1);

		// set authorisation
		curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
		curl_setopt($ch, CURLOPT_USERPWD, $username . ":" . $password);
		curl_setopt($ch, CURLOPT_POST, count($params));
		curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));

		// set a custom User-Agent
		$userAgent = $config->get('applicationName') . " " . \Adyen\Client::USER_AGENT_SUFFIX . $client->getLibraryVersion();

		//Set the content type to application/json and use the defined userAgent
		$headers = array(
			'Content-Type: application/x-www-form-urlencoded',
			'User-Agent: ' . $userAgent
		);

		curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

		// return the result
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

		//Execute the request
		list($result, $httpStatus) = $this->curlRequest($ch);

		// log the raw response
		$logger->info("JSON Response is: " . $result);

		// Get errors
		list($errno, $message) = $this->curlError($ch);

		curl_close($ch);

		if ($httpStatus != 200 && $result) {
			$this->handleResultError($result, $logger);
		} elseif (!$result) {
			$this->handleCurlError($requestUrl, $errno, $message, $logger);
		}

		// result in array or json
		if ($config->getOutputType() == 'array') {
			// transform to PHP Array
			$result = json_decode($result, true);

			if (!$result) {
				$msg = "The result is empty, looks like your request is invalid";
				$logger->error($msg);
				throw new \Adyen\AdyenException($msg);
			}

			// log the array result
			$logger->info('Params in response from Adyen:' . print_r($result, 1));
		}

		return $result;
	}