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 d2419537 authored by attilak's avatar attilak

Use $objectManager to get the magento name and version

parent ec1ef2c8
......@@ -71,7 +71,9 @@ class TransactionAuthorization implements ClientInterface
$client->setAdyenPaymentSource($this->_adyenHelper->getModuleName(), $this->_adyenHelper->getModuleVersion());
$productMetadata = new \Magento\Framework\App\ProductMetadata();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface');
$client->setExternalPlatform($productMetadata->getName(), $productMetadata->getVersion());
if ($this->_adyenHelper->isDemoMode()) {
......
......@@ -66,7 +66,8 @@ class TransactionCancel implements ClientInterface
$client->setAdyenPaymentSource($this->_adyenHelper->getModuleName(), $this->_adyenHelper->getModuleVersion());
$productMetadata = new \Magento\Framework\App\ProductMetadata();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface');
$client->setExternalPlatform($productMetadata->getName(), $productMetadata->getVersion());
if ($this->_adyenHelper->isDemoMode()) {
......
......@@ -66,7 +66,8 @@ class TransactionCapture implements ClientInterface
$client->setAdyenPaymentSource($this->_adyenHelper->getModuleName(), $this->_adyenHelper->getModuleVersion());
$productMetadata = new \Magento\Framework\App\ProductMetadata();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface');
$client->setExternalPlatform($productMetadata->getName(), $productMetadata->getVersion());
if ($this->_adyenHelper->isDemoMode()) {
......
......@@ -66,7 +66,8 @@ class TransactionRefund implements ClientInterface
$client->setAdyenPaymentSource($this->_adyenHelper->getModuleName(), $this->_adyenHelper->getModuleVersion());
$productMetadata = new \Magento\Framework\App\ProductMetadata();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface');
$client->setExternalPlatform($productMetadata->getName(), $productMetadata->getVersion());
if ($this->_adyenHelper->isDemoMode()) {
......
......@@ -90,7 +90,8 @@ class PaymentRequest extends DataObject
$client->setAdyenPaymentSource($this->_adyenHelper->getModuleName(), $this->_adyenHelper->getModuleVersion());
$productMetadata = new \Magento\Framework\App\ProductMetadata();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface');
$client->setExternalPlatform($productMetadata->getName(), $productMetadata->getVersion());
if ($this->_adyenHelper->isDemoMode($storeId)) {
......
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