diff --git a/src/Helper.php b/src/Helper.php index ed184cfc..3d0405a8 100644 --- a/src/Helper.php +++ b/src/Helper.php @@ -197,8 +197,8 @@ public static function splitAddress($strAddress) public static function getBaseUrl() { $protocol = isset($_SERVER["HTTPS"]) ? 'https' : 'http'; + $url = $protocol . '://' . $_SERVER['SERVER_NAME'] .':'.$_SERVER['SERVER_PORT']. $_SERVER['REQUEST_URI']; - $url = $protocol . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; // op de laatste / afknippen (index.php willen we niet zien) $baseUrl = substr($url, 0, strrpos($url, '/')); diff --git a/src/Transaction.php b/src/Transaction.php index 92d4fc53..a8c37bab 100644 --- a/src/Transaction.php +++ b/src/Transaction.php @@ -48,6 +48,9 @@ public static function start($options = array()) $api->setCurrency($options['currency']); } if(isset($options['expireDate'])){ + if(is_string($options['expireDate'])){ + $options['expireDate'] = new \DateTime($options['expireDate']); + } $api->setExpireDate($options['expireDate']); } @@ -89,10 +92,16 @@ public static function start($options = array()) } if(isset($options['invoiceDate'])){ + if(is_string($options['invoiceDate'])){ + $options['invoiceDate'] = new \DateTime($options['invoiceDate']); + } $api->setInvoiceDate($options['invoiceDate']); } if(isset($options['deliveryDate'])){ + if(is_string($options['deliveryDate'])){ + $options['deliveryDate'] = new \DateTime($options['deliveryDate']); + } $api->setDeliveryDate($options['deliveryDate']); } @@ -106,6 +115,9 @@ public static function start($options = array()) } $enduser = array(); if (isset($options['enduser'])) { + if(isset($options['enduser']['birthDate'])){ + $options['enduser']['birthDate'] = new \DateTime($options['enduser']['birthDate']); + } $enduser = $options['enduser']; } if (isset($options['language'])) {