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 c6fa0745 authored by Rik ter Beek's avatar Rik ter Beek

Remove Cron controller should not be accessable from browser,

 remove exti and die statements what is not allowed, changed reservered PHP7 name resource to resourceModel following magento conventions and fix to use the right exeption class
parent 80266bd7
...@@ -34,7 +34,7 @@ class AbstractInfo extends \Magento\Payment\Block\Info ...@@ -34,7 +34,7 @@ class AbstractInfo extends \Magento\Payment\Block\Info
protected $_adyenHelper; protected $_adyenHelper;
/** /**
* @var \Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory * @var \Adyen\Payment\Model\ResourceModel\Order\Payment\CollectionFactory
*/ */
protected $_adyenOrderPaymentCollectionFactory; protected $_adyenOrderPaymentCollectionFactory;
...@@ -42,13 +42,13 @@ class AbstractInfo extends \Magento\Payment\Block\Info ...@@ -42,13 +42,13 @@ class AbstractInfo extends \Magento\Payment\Block\Info
* AbstractInfo constructor. * AbstractInfo constructor.
* *
* @param \Adyen\Payment\Helper\Data $adyenHelper * @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory * @param \Adyen\Payment\Model\ResourceModel\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory
* @param Template\Context $context * @param Template\Context $context
* @param array $data * @param array $data
*/ */
public function __construct( public function __construct(
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory, \Adyen\Payment\Model\ResourceModel\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory,
Template\Context $context, Template\Context $context,
array $data = [] array $data = []
) )
......
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Controller\Process;
use Symfony\Component\Config\Definition\Exception\Exception;
/**
* Class Json
* @package Adyen\Payment\Controller\Process
*/
class Cron extends \Magento\Framework\App\Action\Action
{
/**
* @var \Magento\Framework\ObjectManagerInterface
*/
protected $_objectManager;
/**
* @var \Magento\Framework\Controller\Result\RawFactory
*/
protected $_resultFactory;
/**
* Cron constructor.
*
* @param \Magento\Framework\App\Action\Context $context
*/
public function __construct(
\Magento\Framework\App\Action\Context $context
) {
parent::__construct($context);
$this->_objectManager = $context->getObjectManager();
$this->_resultFactory = $context->getResultFactory();
}
/**
* Process Notification from Cron
*/
public function execute()
{
$cron = $this->_objectManager->create('Adyen\Payment\Model\Cron');
$cron->processNotification();
die();
}
}
\ No newline at end of file
...@@ -62,7 +62,8 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -62,7 +62,8 @@ class Json extends \Magento\Framework\App\Action\Action
\Magento\Framework\App\Action\Context $context, \Magento\Framework\App\Action\Context $context,
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger \Adyen\Payment\Logger\AdyenLogger $adyenLogger
) { )
{
parent::__construct($context); parent::__construct($context);
$this->_objectManager = $context->getObjectManager(); $this->_objectManager = $context->getObjectManager();
$this->_resultFactory = $context->getResultFactory(); $this->_resultFactory = $context->getResultFactory();
...@@ -100,6 +101,8 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -100,6 +101,8 @@ class Json extends \Magento\Framework\App\Action\Action
if ($notificationMode != "" && $this->_validateNotificationMode($notificationMode)) { if ($notificationMode != "" && $this->_validateNotificationMode($notificationMode)) {
foreach ($notificationItems['notificationItems'] as $notificationItem) { foreach ($notificationItems['notificationItems'] as $notificationItem) {
$status = $this->_processNotification( $status = $this->_processNotification(
$notificationItem['NotificationRequestItem'], $notificationMode $notificationItem['NotificationRequestItem'], $notificationMode
); );
...@@ -108,9 +111,10 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -108,9 +111,10 @@ class Json extends \Magento\Framework\App\Action\Action
$this->_return401(); $this->_return401();
return; return;
} }
}
$acceptedMessage = "[accepted]"; $acceptedMessage = "[accepted]";
}
$cronCheckTest = $notificationItems['notificationItems'][0]['NotificationRequestItem']['pspReference']; $cronCheckTest = $notificationItems['notificationItems'][0]['NotificationRequestItem']['pspReference'];
// Run the query for checking unprocessed notifications, do this only for test notifications coming from the Adyen Customer Area // Run the query for checking unprocessed notifications, do this only for test notifications coming from the Adyen Customer Area
...@@ -247,8 +251,7 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -247,8 +251,7 @@ class Json extends \Magento\Framework\App\Action\Action
if (empty($submitedMerchantAccount) && empty($internalMerchantAccount)) { if (empty($submitedMerchantAccount) && empty($internalMerchantAccount)) {
if ($this->_isTestNotification($response['pspReference'])) { if ($this->_isTestNotification($response['pspReference'])) {
echo 'merchantAccountCode is empty in magento settings'; $this->_returnResult('merchantAccountCode is empty in magento settings');
exit();
} }
return false; return false;
} }
...@@ -256,8 +259,9 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -256,8 +259,9 @@ class Json extends \Magento\Framework\App\Action\Action
// validate username and password // validate username and password
if ((!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['PHP_AUTH_PW']))) { if ((!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['PHP_AUTH_PW']))) {
if ($this->_isTestNotification($response['pspReference'])) { if ($this->_isTestNotification($response['pspReference'])) {
echo 'Authentication failed: PHP_AUTH_USER and PHP_AUTH_PW are empty. See Adyen Magento manual CGI mode'; $this->_returnResult(
exit(); 'Authentication failed: PHP_AUTH_USER and PHP_AUTH_PW are empty. See Adyen Magento manual CGI mode'
);
} }
return false; return false;
} }
...@@ -275,11 +279,11 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -275,11 +279,11 @@ class Json extends \Magento\Framework\App\Action\Action
// If notification is test check if fields are correct if not return error // If notification is test check if fields are correct if not return error
if ($this->_isTestNotification($response['pspReference'])) { if ($this->_isTestNotification($response['pspReference'])) {
if ($accountCmp != 0) { if ($accountCmp != 0) {
echo 'MerchantAccount in notification is not the same as in Magento settings'; $this->_returnResult('MerchantAccount in notification is not the same as in Magento settings');
exit();
} elseif ($usernameCmp != 0 || $passwordCmp != 0) { } elseif ($usernameCmp != 0 || $passwordCmp != 0) {
echo 'username (PHP_AUTH_USER) and\or password (PHP_AUTH_PW) are not the same as Magento settings'; $this->_returnResult(
exit(); 'username (PHP_AUTH_USER) and\or password (PHP_AUTH_PW) are not the same as Magento settings'
);
} }
} }
return false; return false;
...@@ -356,4 +360,18 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -356,4 +360,18 @@ class Json extends \Magento\Framework\App\Action\Action
return false; return false;
} }
} }
/**
* Returns the message to the browser
*
* @param $message
*/
protected function _returnResult($message)
{
$this->getResponse()
->clearHeader('Content-Type')
->setHeader('Content-Type', 'text/html')
->setBody($message);
return;
}
} }
\ No newline at end of file
...@@ -37,18 +37,18 @@ class RefundDataBuilder implements BuilderInterface ...@@ -37,18 +37,18 @@ class RefundDataBuilder implements BuilderInterface
private $adyenHelper; private $adyenHelper;
/** /**
* @var \Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory * @var \Adyen\Payment\Model\ResourceModel\Order\Payment\CollectionFactory
*/ */
private $orderPaymentCollectionFactory; private $orderPaymentCollectionFactory;
/** /**
* RefundDataBuilder constructor. * RefundDataBuilder constructor.
* @param \Adyen\Payment\Helper\Data $adyenHelper * @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory $orderPaymentCollectionFactory * @param \Adyen\Payment\Model\ResourceModel\Order\Payment\CollectionFactory $orderPaymentCollectionFactory
*/ */
public function __construct( public function __construct(
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory $orderPaymentCollectionFactory \Adyen\Payment\Model\ResourceModel\Order\Payment\CollectionFactory $orderPaymentCollectionFactory
) )
{ {
$this->adyenHelper = $adyenHelper; $this->adyenHelper = $adyenHelper;
......
...@@ -55,7 +55,7 @@ class Data extends AbstractHelper ...@@ -55,7 +55,7 @@ class Data extends AbstractHelper
protected $_moduleList; protected $_moduleList;
/** /**
* @var \Adyen\Payment\Model\Resource\Billing\Agreement\CollectionFactory * @var \Adyen\Payment\Model\ResourceModel\Billing\Agreement\CollectionFactory
*/ */
protected $_billingAgreementCollectionFactory; protected $_billingAgreementCollectionFactory;
...@@ -69,6 +69,11 @@ class Data extends AbstractHelper ...@@ -69,6 +69,11 @@ class Data extends AbstractHelper
*/ */
protected $_assetSource; protected $_assetSource;
/**
* @var \Adyen\Payment\Model\ResourceModel\Notification\CollectionFactory
*/
protected $_notificationFactory;
/** /**
* Data constructor. * Data constructor.
* *
...@@ -77,7 +82,7 @@ class Data extends AbstractHelper ...@@ -77,7 +82,7 @@ class Data extends AbstractHelper
* @param \Magento\Framework\Config\DataInterface $dataStorage * @param \Magento\Framework\Config\DataInterface $dataStorage
* @param \Magento\Directory\Model\Config\Source\Country $country * @param \Magento\Directory\Model\Config\Source\Country $country
* @param \Magento\Framework\Module\ModuleListInterface $moduleList * @param \Magento\Framework\Module\ModuleListInterface $moduleList
* @param \Adyen\Payment\Model\Resource\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory * @param \Adyen\Payment\Model\ResourceModel\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory
* @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\View\Asset\Repository $assetRepo
* @param \Magento\Framework\View\Asset\Source $assetSource * @param \Magento\Framework\View\Asset\Source $assetSource
*/ */
...@@ -87,10 +92,10 @@ class Data extends AbstractHelper ...@@ -87,10 +92,10 @@ class Data extends AbstractHelper
\Magento\Framework\Config\DataInterface $dataStorage, \Magento\Framework\Config\DataInterface $dataStorage,
\Magento\Directory\Model\Config\Source\Country $country, \Magento\Directory\Model\Config\Source\Country $country,
\Magento\Framework\Module\ModuleListInterface $moduleList, \Magento\Framework\Module\ModuleListInterface $moduleList,
\Adyen\Payment\Model\Resource\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory, \Adyen\Payment\Model\ResourceModel\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory,
\Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\Asset\Repository $assetRepo,
\Magento\Framework\View\Asset\Source $assetSource, \Magento\Framework\View\Asset\Source $assetSource,
\Adyen\Payment\Model\Resource\Notification\CollectionFactory $notificationFactory \Adyen\Payment\Model\ResourceModel\Notification\CollectionFactory $notificationFactory
) )
{ {
parent::__construct($context); parent::__construct($context);
......
...@@ -41,7 +41,7 @@ class Cron ...@@ -41,7 +41,7 @@ class Cron
protected $_logger; protected $_logger;
/** /**
* @var Resource\Notification\CollectionFactory * @var ResourceModel\Notification\CollectionFactory
*/ */
protected $_notificationFactory; protected $_notificationFactory;
...@@ -88,7 +88,7 @@ class Cron ...@@ -88,7 +88,7 @@ class Cron
protected $_billingAgreementFactory; protected $_billingAgreementFactory;
/** /**
* @var Resource\Billing\Agreement\CollectionFactory * @var ResourceModel\Billing\Agreement\CollectionFactory
*/ */
protected $_billingAgreementCollectionFactory; protected $_billingAgreementCollectionFactory;
...@@ -168,7 +168,7 @@ class Cron ...@@ -168,7 +168,7 @@ class Cron
protected $_adyenOrderPaymentFactory; protected $_adyenOrderPaymentFactory;
/** /**
* @var Resource\Order\Payment\CollectionFactory * @var ResourceModel\Order\Payment\CollectionFactory
*/ */
protected $_adyenOrderPaymentCollectionFactory; protected $_adyenOrderPaymentCollectionFactory;
...@@ -182,33 +182,33 @@ class Cron ...@@ -182,33 +182,33 @@ class Cron
* *
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger * @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
* @param Resource\Notification\CollectionFactory $notificationFactory * @param ResourceModel\Notification\CollectionFactory $notificationFactory
* @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Adyen\Payment\Helper\Data $adyenHelper * @param \Adyen\Payment\Helper\Data $adyenHelper
* @param OrderSender $orderSender * @param OrderSender $orderSender
* @param InvoiceSender $invoiceSender * @param InvoiceSender $invoiceSender
* @param \Magento\Framework\DB\TransactionFactory $transactionFactory * @param \Magento\Framework\DB\TransactionFactory $transactionFactory
* @param Billing\AgreementFactory $billingAgreementFactory * @param Billing\AgreementFactory $billingAgreementFactory
* @param Resource\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory * @param ResourceModel\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory
* @param Api\PaymentRequest $paymentRequest * @param Api\PaymentRequest $paymentRequest
* @param Order\PaymentFactory $adyenOrderPaymentFactory * @param Order\PaymentFactory $adyenOrderPaymentFactory
* @param Resource\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory * @param ResourceModel\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory
* @param AreaList $areaList * @param AreaList $areaList
*/ */
public function __construct( public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger, \Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Adyen\Payment\Model\Resource\Notification\CollectionFactory $notificationFactory, \Adyen\Payment\Model\ResourceModel\Notification\CollectionFactory $notificationFactory,
\Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Model\OrderFactory $orderFactory,
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
OrderSender $orderSender, OrderSender $orderSender,
InvoiceSender $invoiceSender, InvoiceSender $invoiceSender,
\Magento\Framework\DB\TransactionFactory $transactionFactory, \Magento\Framework\DB\TransactionFactory $transactionFactory,
\Adyen\Payment\Model\Billing\AgreementFactory $billingAgreementFactory, \Adyen\Payment\Model\Billing\AgreementFactory $billingAgreementFactory,
\Adyen\Payment\Model\Resource\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory, \Adyen\Payment\Model\ResourceModel\Billing\Agreement\CollectionFactory $billingAgreementCollectionFactory,
\Adyen\Payment\Model\Api\PaymentRequest $paymentRequest, \Adyen\Payment\Model\Api\PaymentRequest $paymentRequest,
\Adyen\Payment\Model\Order\PaymentFactory $adyenOrderPaymentFactory, \Adyen\Payment\Model\Order\PaymentFactory $adyenOrderPaymentFactory,
\Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory, \Adyen\Payment\Model\ResourceModel\Order\Payment\CollectionFactory $adyenOrderPaymentCollectionFactory,
AreaList $areaList AreaList $areaList
) { ) {
$this->_scopeConfig = $scopeConfig; $this->_scopeConfig = $scopeConfig;
......
...@@ -96,7 +96,7 @@ class Adapter extends Method\Adapter ...@@ -96,7 +96,7 @@ class Adapter extends Method\Adapter
$agreement->getCustomerReference(), $agreement->getCustomerReference(),
$agreement->getStoreId() $agreement->getStoreId()
); );
} catch(Exception $e) { } catch(\Exception $e) {
throw new \Magento\Framework\Exception\LocalizedException(__('Failed to disable this contract')); throw new \Magento\Framework\Exception\LocalizedException(__('Failed to disable this contract'));
} }
} }
......
...@@ -76,7 +76,7 @@ class Notification extends \Magento\Framework\Model\AbstractModel ...@@ -76,7 +76,7 @@ class Notification extends \Magento\Framework\Model\AbstractModel
*/ */
protected function _construct() protected function _construct()
{ {
$this->_init('Adyen\Payment\Model\Resource\Notification'); $this->_init('Adyen\Payment\Model\ResourceModel\Notification');
} }
/** /**
......
...@@ -55,7 +55,7 @@ class Payment extends \Magento\Framework\Model\AbstractModel ...@@ -55,7 +55,7 @@ class Payment extends \Magento\Framework\Model\AbstractModel
*/ */
protected function _construct() protected function _construct()
{ {
$this->_init('Adyen\Payment\Model\Resource\Order\Payment'); $this->_init('Adyen\Payment\Model\ResourceModel\Order\Payment');
} }
/** /**
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Author: Adyen <magento@adyen.com> * Author: Adyen <magento@adyen.com>
*/ */
namespace Adyen\Payment\Model\Resource\Billing; namespace Adyen\Payment\Model\ResourceModel\Billing;
/** /**
* Billing agreement resource model * Billing agreement resource model
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Author: Adyen <magento@adyen.com> * Author: Adyen <magento@adyen.com>
*/ */
namespace Adyen\Payment\Model\Resource\Billing\Agreement; namespace Adyen\Payment\Model\ResourceModel\Billing\Agreement;
/** /**
* Billing agreements resource collection * Billing agreements resource collection
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Author: Adyen <magento@adyen.com> * Author: Adyen <magento@adyen.com>
*/ */
namespace Adyen\Payment\Model\Resource; namespace Adyen\Payment\Model\ResourceModel;
class Notification extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb class Notification extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{ {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Author: Adyen <magento@adyen.com> * Author: Adyen <magento@adyen.com>
*/ */
namespace Adyen\Payment\Model\Resource\Notification; namespace Adyen\Payment\Model\ResourceModel\Notification;
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{ {
...@@ -30,7 +30,7 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab ...@@ -30,7 +30,7 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
*/ */
public function _construct() public function _construct()
{ {
$this->_init('Adyen\Payment\Model\Notification', 'Adyen\Payment\Model\Resource\Notification'); $this->_init('Adyen\Payment\Model\Notification', 'Adyen\Payment\Model\ResourceModel\Notification');
} }
/** /**
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Author: Adyen <magento@adyen.com> * Author: Adyen <magento@adyen.com>
*/ */
namespace Adyen\Payment\Model\Resource\Order; namespace Adyen\Payment\Model\ResourceModel\Order;
class Payment extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb class Payment extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{ {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Author: Adyen <magento@adyen.com> * Author: Adyen <magento@adyen.com>
*/ */
namespace Adyen\Payment\Model\Resource\Order\Payment; namespace Adyen\Payment\Model\ResourceModel\Order\Payment;
/** /**
* Billing agreements resource collection * Billing agreements resource collection
...@@ -36,7 +36,7 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab ...@@ -36,7 +36,7 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
*/ */
protected function _construct() protected function _construct()
{ {
$this->_init('Adyen\Payment\Model\Order\Payment', 'Adyen\Payment\Model\Resource\Order\Payment'); $this->_init('Adyen\Payment\Model\Order\Payment', 'Adyen\Payment\Model\ResourceModel\Order\Payment');
} }
/** /**
......
...@@ -44,10 +44,10 @@ class DataTest extends TestCase ...@@ -44,10 +44,10 @@ class DataTest extends TestCase
$dataStorage = $this->getSimpleMock('\Magento\Framework\Config\DataInterface'); $dataStorage = $this->getSimpleMock('\Magento\Framework\Config\DataInterface');
$country = $this->getSimpleMock('\Magento\Directory\Model\Config\Source\Country'); $country = $this->getSimpleMock('\Magento\Directory\Model\Config\Source\Country');
$moduleList = $this->getSimpleMock('\Magento\Framework\Module\ModuleListInterface'); $moduleList = $this->getSimpleMock('\Magento\Framework\Module\ModuleListInterface');
$billingAgreementCollectionFactory = $this->getSimpleMock('\Adyen\Payment\Model\Resource\Billing\Agreement\CollectionFactory'); $billingAgreementCollectionFactory = $this->getSimpleMock('\Adyen\Payment\Model\ResourceModel\Billing\Agreement\CollectionFactory');
$assetRepo = $this->getSimpleMock('\Magento\Framework\View\Asset\Repository'); $assetRepo = $this->getSimpleMock('\Magento\Framework\View\Asset\Repository');
$assetSource = $this->getSimpleMock('\Magento\Framework\View\Asset\Source'); $assetSource = $this->getSimpleMock('\Magento\Framework\View\Asset\Source');
$notificationFactory = $this->getSimpleMock('\Adyen\Payment\Model\Resource\Notification\CollectionFactory'); $notificationFactory = $this->getSimpleMock('\Adyen\Payment\Model\ResourceModel\Notification\CollectionFactory');
$this->dataHelper = new Data($context, $encryptor, $dataStorage, $country, $moduleList, $this->dataHelper = new Data($context, $encryptor, $dataStorage, $country, $moduleList,
$billingAgreementCollectionFactory, $assetRepo, $assetSource, $notificationFactory); $billingAgreementCollectionFactory, $assetRepo, $assetSource, $notificationFactory);
......
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