From cb5ebcbf81fd3af6d59694f13a4ffda64199659b Mon Sep 17 00:00:00 2001 From: taehyunlim Date: Wed, 11 Aug 2021 22:48:47 -0700 Subject: [PATCH 1/2] Revert "adds log to validation" This reverts commit e35699002b8aac098008a99763bbc55dac86ae79. --- .../Validator/Client/PaymentActionsValidator.php | 13 ------------- .../Client/PaymentActionsValidatorVoid.php | 13 ------------- Gateway/Validator/CurrencyValidator.php | 10 +--------- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/Gateway/Validator/Client/PaymentActionsValidator.php b/Gateway/Validator/Client/PaymentActionsValidator.php index b3919005..a86da41e 100644 --- a/Gateway/Validator/Client/PaymentActionsValidator.php +++ b/Gateway/Validator/Client/PaymentActionsValidator.php @@ -20,24 +20,12 @@ use Magento\Payment\Gateway\Helper\SubjectReader; use Astound\Affirm\Gateway\Helper\Util; -use Astound\Affirm\Logger\Logger; /** * Class PaymentActionsValidator */ class PaymentActionsValidator extends AbstractResponseValidator { - /** - * Constructor - * - * @param Logger $logger - */ - public function __construct( - Logger $logger - ) { - $this->logger = $logger; - } - /** * @inheritdoc */ @@ -56,7 +44,6 @@ public function validate(array $validationSubject) [__('Affirm error code:') . $response[self::RESPONSE_CODE] . __(' error: ') . __($response[self::ERROR_MESSAGE])]: [__('Transaction has been declined, please, try again later.')]; - $this->logger->debug('Astound\Affirm\Gateway\Validator\Client\PaymentActionsValidator::validate', $errorMessages); } return $this->createResult($validationResult, $errorMessages); diff --git a/Gateway/Validator/Client/PaymentActionsValidatorVoid.php b/Gateway/Validator/Client/PaymentActionsValidatorVoid.php index 3879e1e0..777c43ca 100644 --- a/Gateway/Validator/Client/PaymentActionsValidatorVoid.php +++ b/Gateway/Validator/Client/PaymentActionsValidatorVoid.php @@ -19,7 +19,6 @@ namespace Astound\Affirm\Gateway\Validator\Client; use Magento\Payment\Gateway\Helper\SubjectReader; -use Astound\Affirm\Logger\Logger; /** * Class PaymentActionsValidatorVoid @@ -33,17 +32,6 @@ class PaymentActionsValidatorVoid extends PaymentActionsValidator const RESPONSE_TYPE_VOID = 'void'; /**#@-*/ - /** - * Constructor - * - * @param Logger $logger - */ - public function __construct( - Logger $logger - ) { - $this->logger = $logger; - } - /** * @inheritdoc */ @@ -57,7 +45,6 @@ public function validate(array $validationSubject) if (!$validationResult) { $errorMessages = [__('Transaction has been declined, please, try again later.')]; - $this->logger->debug('Astound\Affirm\Gateway\Validator\Client\PaymentActionsValidatorVoid::validate', $errorMessages); } return $this->createResult($validationResult, $errorMessages); diff --git a/Gateway/Validator/CurrencyValidator.php b/Gateway/Validator/CurrencyValidator.php index bc8a9784..e8fdf154 100644 --- a/Gateway/Validator/CurrencyValidator.php +++ b/Gateway/Validator/CurrencyValidator.php @@ -21,7 +21,6 @@ use Magento\Payment\Gateway\Validator\ResultInterface; use Magento\Payment\Gateway\Validator\ResultInterfaceFactory; use Magento\Payment\Gateway\Validator\AbstractValidator; -use Astound\Affirm\Logger\Logger; /** * Class CurrencyValidator @@ -43,15 +42,12 @@ class CurrencyValidator extends AbstractValidator * * @param ResultInterfaceFactory $resultFactory * @param \Magento\Payment\Gateway\ConfigInterface $config - * @param Logger $logger */ public function __construct( ResultInterfaceFactory $resultFactory, - ConfigInterface $config, - Logger $logger + ConfigInterface $config ) { $this->config = $config; - $this->logger = $logger; parent::__construct($resultFactory); } @@ -63,7 +59,6 @@ public function __construct( */ public function validate(array $validationSubject) { - $log = []; $isValid = true; $storeId = $validationSubject['storeId']; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); @@ -77,9 +72,6 @@ public function validate(array $validationSubject) if (!in_array($currentCurrencyCode, $availableCurrencies)) { $isValid = false; - $log['code'] = $currentCurrencyCode; - $log['availableCurrencies'] = $availableCurrencies; - $this->logger->debug('Astound\Affirm\Gateway\Validator\CurrencyValidator::validate', $log); } } return $this->createResult($isValid); From 2dc26197ada5fd4ffc20f73b85f5b02d3a8e1ffb Mon Sep 17 00:00:00 2001 From: taehyunlim Date: Wed, 11 Aug 2021 22:56:18 -0700 Subject: [PATCH 2/2] version bump to 3.0.13 --- composer.json | 2 +- etc/module.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a17d7207..57697518 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "affirm/magento2", "description": "Affirm's extension for the Magento 2 https://www.affirm.com/", "type": "magento2-module", - "version": "3.0.12", + "version": "3.0.13", "license": [ "BSD-3-Clause" ], diff --git a/etc/module.xml b/etc/module.xml index 5a13be1b..d105434c 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -10,7 +10,7 @@ */ --> - +