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