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'])) {