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 0433c8c9 authored by alessio's avatar alessio

add storeid to helper

parent 78c71646
......@@ -51,7 +51,6 @@ class TransactionAuthorization implements ClientInterface
\Magento\Framework\Encryption\EncryptorInterface $encryptor,
\Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Model\RecurringType $recurringType,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = []
) {
$this->_encryptor = $encryptor;
......@@ -59,8 +58,7 @@ class TransactionAuthorization implements ClientInterface
$this->_recurringType = $recurringType;
$this->_appState = $context->getAppState();
$storeId = $storeManager->getStore()->getId();
$this->_client = $this->_adyenHelper->initializeAdyenClient($storeId);
$this->_client = $this->_adyenHelper->initializeAdyenClient();
}
/**
......
......@@ -45,15 +45,14 @@ class TransactionCancel implements ClientInterface
\Magento\Framework\Encryption\EncryptorInterface $encryptor,
\Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Model\RecurringType $recurringType,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = []
) {
$this->_encryptor = $encryptor;
$this->_adyenHelper = $adyenHelper;
$this->_recurringType = $recurringType;
$this->_appState = $context->getAppState();
$storeId = $storeManager->getStore()->getId();
$this->_client = $this->_adyenHelper->initializeAdyenClient($storeId);
$this->_client = $this->_adyenHelper->initializeAdyenClient();
}
/**
......
......@@ -47,7 +47,6 @@ class TransactionCapture implements ClientInterface
\Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Adyen\Payment\Model\RecurringType $recurringType,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = []
) {
$this->_encryptor = $encryptor;
......@@ -55,8 +54,8 @@ class TransactionCapture implements ClientInterface
$this->_adyenLogger = $adyenLogger;
$this->_recurringType = $recurringType;
$this->_appState = $context->getAppState();
$storeId = $storeManager->getStore()->getId();
$this->_client = $this->_adyenHelper->initializeAdyenClient($storeId);
$this->_client = $this->_adyenHelper->initializeAdyenClient();
}
/**
......
......@@ -46,8 +46,6 @@ class TransactionPayment implements ClientInterface
\Magento\Store\Model\StoreManagerInterface $storeManager
) {
$this->adyenHelper = $adyenHelper;
$storeId = $storeManager->getStore()->getId();
$this->_client = $this->adyenHelper->initializeAdyenClient($storeId);
}
/**
......
......@@ -45,7 +45,6 @@ class TransactionRefund implements ClientInterface
\Magento\Framework\Encryption\EncryptorInterface $encryptor,
\Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Model\RecurringType $recurringType,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = []
) {
$this->_encryptor = $encryptor;
......@@ -53,8 +52,7 @@ class TransactionRefund implements ClientInterface
$this->_recurringType = $recurringType;
$this->_appState = $context->getAppState();
$storeId = $storeManager->getStore()->getId();
$this->_client = $this->_adyenHelper->initializeAdyenClient($storeId);
$this->_client = $this->_adyenHelper->initializeAdyenClient();
}
/**
......
......@@ -1343,6 +1343,10 @@ class Data extends AbstractHelper
public function initializeAdyenClient($storeId = null, $apiKey = null)
{
// initialize client
if (empty($storeId)) {
$storeId = $this->storeManager->getStore()->getId();
}
if (empty($apiKey)) {
$apiKey = $this->getAPIKey($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