Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Pieters committed Apr 12, 2016
2 parents b94f3a1 + 369dc4f commit 791eed8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, '/'));
Expand Down
12 changes: 12 additions & 0 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}

Expand Down Expand Up @@ -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']);
}

Expand All @@ -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'])) {
Expand Down

0 comments on commit 791eed8

Please sign in to comment.