We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 90a3e5d6 authored by cyattilakiss's avatar cyattilakiss Committed by GitHub

Merge pull request #365 from stkams/develop

The UCD needs to get the customer ID via a different way
parents 4c911479 f3df54a6
......@@ -27,6 +27,7 @@ namespace Adyen\Payment\Model;
use Adyen\Payment\Api\AdyenInitiateTerminalApiInterface;
use Adyen\Payment\Model\Ui\AdyenPosCloudConfigProvider;
use Adyen\Util\Util;
use Magento\Quote\Model\Quote;
class AdyenInitiateTerminalApi implements AdyenInitiateTerminalApiInterface
{
......@@ -105,7 +106,6 @@ class AdyenInitiateTerminalApi implements AdyenInitiateTerminalApiInterface
$serviceID = date("dHis");
$initiateDate = date("U");
$timeStamper = date("Y-m-d") . "T" . date("H:i:s+00:00");
$customerId = $quote->getCustomerId();
$request = [
'SaleToPOIRequest' =>
......@@ -147,6 +147,8 @@ class AdyenInitiateTerminalApi implements AdyenInitiateTerminalApiInterface
],
];
$customerId = $this->getCustomerId($quote);
// If customer exists add it into the request to store request
if (!empty($customerId)) {
$shopperEmail = $quote->getCustomerEmail();
......@@ -195,4 +197,13 @@ class AdyenInitiateTerminalApi implements AdyenInitiateTerminalApiInterface
$quote->save();
return $response;
}
/**
* @param Quote $quote
* @return mixed
*/
public function getCustomerId(Quote $quote)
{
return $quote->getCustomerId();
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment