We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 78c71646 authored by alessio's avatar alessio

add storeid to clients

parent ac142185
...@@ -50,17 +50,17 @@ class TransactionAuthorization implements ClientInterface ...@@ -50,17 +50,17 @@ class TransactionAuthorization implements ClientInterface
\Magento\Framework\Model\Context $context, \Magento\Framework\Model\Context $context,
\Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\Encryption\EncryptorInterface $encryptor,
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Adyen\Payment\Model\RecurringType $recurringType, \Adyen\Payment\Model\RecurringType $recurringType,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = [] array $data = []
) { ) {
$this->_encryptor = $encryptor; $this->_encryptor = $encryptor;
$this->_adyenHelper = $adyenHelper; $this->_adyenHelper = $adyenHelper;
$this->_adyenLogger = $adyenLogger;
$this->_recurringType = $recurringType; $this->_recurringType = $recurringType;
$this->_appState = $context->getAppState(); $this->_appState = $context->getAppState();
$this->_client = $this->_adyenHelper->initializeAdyenClient(); $storeId = $storeManager->getStore()->getId();
$this->_client = $this->_adyenHelper->initializeAdyenClient($storeId);
} }
/** /**
......
...@@ -37,7 +37,6 @@ class TransactionCancel implements ClientInterface ...@@ -37,7 +37,6 @@ class TransactionCancel implements ClientInterface
* @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Encryption\EncryptorInterface $encryptor * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
* @param \Adyen\Payment\Helper\Data $adyenHelper * @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
* @param \Adyen\Payment\Model\RecurringType $recurringType * @param \Adyen\Payment\Model\RecurringType $recurringType
* @param array $data * @param array $data
*/ */
...@@ -45,17 +44,16 @@ class TransactionCancel implements ClientInterface ...@@ -45,17 +44,16 @@ class TransactionCancel implements ClientInterface
\Magento\Framework\Model\Context $context, \Magento\Framework\Model\Context $context,
\Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\Encryption\EncryptorInterface $encryptor,
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Adyen\Payment\Model\RecurringType $recurringType, \Adyen\Payment\Model\RecurringType $recurringType,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = [] array $data = []
) { ) {
$this->_encryptor = $encryptor; $this->_encryptor = $encryptor;
$this->_adyenHelper = $adyenHelper; $this->_adyenHelper = $adyenHelper;
$this->_adyenLogger = $adyenLogger;
$this->_recurringType = $recurringType; $this->_recurringType = $recurringType;
$this->_appState = $context->getAppState(); $this->_appState = $context->getAppState();
$storeId = $storeManager->getStore()->getId();
$this->_client = $this->_adyenHelper->initializeAdyenClient(); $this->_client = $this->_adyenHelper->initializeAdyenClient($storeId);
} }
/** /**
......
...@@ -47,6 +47,7 @@ class TransactionCapture implements ClientInterface ...@@ -47,6 +47,7 @@ class TransactionCapture implements ClientInterface
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger, \Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Adyen\Payment\Model\RecurringType $recurringType, \Adyen\Payment\Model\RecurringType $recurringType,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = [] array $data = []
) { ) {
$this->_encryptor = $encryptor; $this->_encryptor = $encryptor;
...@@ -54,8 +55,8 @@ class TransactionCapture implements ClientInterface ...@@ -54,8 +55,8 @@ class TransactionCapture implements ClientInterface
$this->_adyenLogger = $adyenLogger; $this->_adyenLogger = $adyenLogger;
$this->_recurringType = $recurringType; $this->_recurringType = $recurringType;
$this->_appState = $context->getAppState(); $this->_appState = $context->getAppState();
$storeId = $storeManager->getStore()->getId();
$this->_client = $this->_adyenHelper->initializeAdyenClient(); $this->_client = $this->_adyenHelper->initializeAdyenClient($storeId);
} }
/** /**
......
...@@ -42,9 +42,12 @@ class TransactionPayment implements ClientInterface ...@@ -42,9 +42,12 @@ class TransactionPayment implements ClientInterface
* @param \Adyen\Payment\Helper\Data $adyenHelper * @param \Adyen\Payment\Helper\Data $adyenHelper
*/ */
public function __construct( public function __construct(
\Adyen\Payment\Helper\Data $adyenHelper \Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Store\Model\StoreManagerInterface $storeManager
) { ) {
$this->adyenHelper = $adyenHelper; $this->adyenHelper = $adyenHelper;
$storeId = $storeManager->getStore()->getId();
$this->_client = $this->adyenHelper->initializeAdyenClient($storeId);
} }
/** /**
...@@ -55,7 +58,6 @@ class TransactionPayment implements ClientInterface ...@@ -55,7 +58,6 @@ class TransactionPayment implements ClientInterface
public function placeRequest(\Magento\Payment\Gateway\Http\TransferInterface $transferObject) public function placeRequest(\Magento\Payment\Gateway\Http\TransferInterface $transferObject)
{ {
$request = $transferObject->getBody(); $request = $transferObject->getBody();
$client = $this->adyenHelper->initializeAdyenClient(); $client = $this->adyenHelper->initializeAdyenClient();
$service = new \Adyen\Service\Checkout($client); $service = new \Adyen\Service\Checkout($client);
......
...@@ -37,7 +37,6 @@ class TransactionRefund implements ClientInterface ...@@ -37,7 +37,6 @@ class TransactionRefund implements ClientInterface
* @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Encryption\EncryptorInterface $encryptor * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
* @param \Adyen\Payment\Helper\Data $adyenHelper * @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
* @param \Adyen\Payment\Model\RecurringType $recurringType * @param \Adyen\Payment\Model\RecurringType $recurringType
* @param array $data * @param array $data
*/ */
...@@ -45,17 +44,17 @@ class TransactionRefund implements ClientInterface ...@@ -45,17 +44,17 @@ class TransactionRefund implements ClientInterface
\Magento\Framework\Model\Context $context, \Magento\Framework\Model\Context $context,
\Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\Encryption\EncryptorInterface $encryptor,
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Adyen\Payment\Model\RecurringType $recurringType, \Adyen\Payment\Model\RecurringType $recurringType,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = [] array $data = []
) { ) {
$this->_encryptor = $encryptor; $this->_encryptor = $encryptor;
$this->_adyenHelper = $adyenHelper; $this->_adyenHelper = $adyenHelper;
$this->_adyenLogger = $adyenLogger;
$this->_recurringType = $recurringType; $this->_recurringType = $recurringType;
$this->_appState = $context->getAppState(); $this->_appState = $context->getAppState();
$this->_client = $this->_adyenHelper->initializeAdyenClient(); $storeId = $storeManager->getStore()->getId();
$this->_client = $this->_adyenHelper->initializeAdyenClient($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