diff --git a/samples/config.php b/samples/config.php index ced63c01..035952f9 100644 --- a/samples/config.php +++ b/samples/config.php @@ -1,3 +1,5 @@ setOpt(CURLOPT_CAINFO, Config::getCAInfoLocation()); + } + $result = $curl->post($uri, $data); + if($curl->error){ + throw new Error\Error($curl->errorMessage); + } + $output = static::processResult($result); return $output; diff --git a/src/Config.php b/src/Config.php index b22ed842..e31b433d 100644 --- a/src/Config.php +++ b/src/Config.php @@ -36,6 +36,27 @@ class Config // @var int The version of the Pay.nl API to use for requests. private static $apiVersion = 5; + /** + * @var string path tho CAInfo location + */ + private static $CAInfoLocation = null; + + /** + * @return string + */ + public static function getCAInfoLocation() + { + return self::$CAInfoLocation; + } + + /** + * @param string $CAInfoLocation + */ + public static function setCAInfoLocation($CAInfoLocation) + { + self::$CAInfoLocation = $CAInfoLocation; + } + /** * @return string The API token used for requests. */