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

minor fixes

parent e262e563
......@@ -40,8 +40,8 @@ class Sepa extends \Magento\Payment\Block\Form
* Sepa constructor.
*
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magento\Payment\Model\Config $paymentConfig
* @param \Adyen\Payment\Helper\Data $adyenHelper
* @param array $data
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
......
......@@ -50,11 +50,6 @@ class PaymentMethods extends AbstractHelper
*/
protected $_adyenHelper;
/**
* @var AdyenGenericConfig
*/
protected $_genericConfig;
/**
* @var \Magento\Checkout\Model\Session
*/
......@@ -87,11 +82,11 @@ class PaymentMethods extends AbstractHelper
/**
* PaymentMethods constructor.
*
* @param \Magento\Quote\Api\CartRepositoryInterface $quoteRepository
* @param \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param Data $adyenHelper
* @param \Adyen\Payment\Model\AdyenGenericConfig $genericConfig
* @param \Magento\Checkout\Model\Session $session
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
......@@ -104,7 +99,6 @@ class PaymentMethods extends AbstractHelper
\Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory,
\Magento\Framework\App\Config\ScopeConfigInterface $config,
\Adyen\Payment\Helper\Data $adyenHelper,
\Adyen\Payment\Model\AdyenGenericConfig $genericConfig,
\Magento\Checkout\Model\Session $session,
\Magento\Framework\Locale\ResolverInterface $localeResolver,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger,
......@@ -116,7 +110,6 @@ class PaymentMethods extends AbstractHelper
$this->_quoteIdMaskFactory = $quoteIdMaskFactory;
$this->_config = $config;
$this->_adyenHelper = $adyenHelper;
$this->_genericConfig = $genericConfig;
$this->_session = $session;
$this->_localeResolver = $localeResolver;
$this->_adyenLogger = $adyenLogger;
......@@ -206,7 +199,7 @@ class PaymentMethods extends AbstractHelper
$paymentMethod = $this->_fieldMapPaymentMethod($paymentMethod);
// add icon location in result
if ($this->_genericConfig->showLogos()) {
if ($this->_adyenHelper->showLogos()) {
$params = [];
......@@ -216,7 +209,7 @@ class PaymentMethods extends AbstractHelper
$asset = $this->_assetRepo->createAsset('Adyen_Payment::images/logos/' .
$paymentMethodCode . '.png', $params);
$placeholder = $this->_genericConfig->findRelativeSourceFilePath($asset);
$placeholder = $this->_adyenHelper->findRelativeSourceFilePath($asset);
$icon = null;
if ($placeholder) {
......
......@@ -273,7 +273,13 @@ class Cc extends \Magento\Payment\Model\Method\Cc
{
switch ($request) {
case "authorise":
try {
$response = $this->_paymentRequest->fullApiRequest($payment, $this->_code);
} catch (\Adyen\AdyenException $e) {
$errorMsg = __('Error with payment method please select different payment method.');
$this->_logger->critical($e->getMessage());
throw new \Magento\Framework\Exception\LocalizedException(__($errorMsg));
}
break;
}
......
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