From 78de1534904311529c399d7e9019fb6b0af12b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89bano=20Lopes?= Date: Mon, 21 Mar 2022 20:42:47 +0000 Subject: [PATCH] MAG-739: Fix pre auth createdAt date --- Helper/PurchaseHelper.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Helper/PurchaseHelper.php b/Helper/PurchaseHelper.php index adae1dea..11f3c0d2 100644 --- a/Helper/PurchaseHelper.php +++ b/Helper/PurchaseHelper.php @@ -1649,13 +1649,16 @@ public function makePurchaseFromQuote(Quote $quote) } } + $dateTime = $this->dateTimeFactory->create(); + $caseCreateDate = $dateTime->gmtDate(); + $purchase['shipments'] = $this->makeShipmentsFromQuote($quote); $purchase['orderChannel'] = "WEB"; $purchase['totalPrice'] = $quote->getGrandTotal(); $purchase['currency'] = $quote->getQuoteCurrencyCode(); $purchase['orderId'] = $reservedOrderId; $purchase['receivedBy'] = $this->getReceivedBy(); - $purchase['createdAt'] = date('c', strtotime($quote->getCreatedAt())); + $purchase['createdAt'] = date('c', strtotime($caseCreateDate)); $purchase['browserIpAddress'] = $this->filterIp($this->remoteAddress->getRemoteAddress()); if ($this->deviceHelper->isDeviceFingerprintEnabled()) {