paynl / magento2-plugin

The Pay. plugin for Magento 2
https://www.pay.nl
27 stars 31 forks source link

\Paynl\Payment\Controller\Checkout\Exchange logger field is not defined but still used in one place (296 line) #170

Closed YachYaroslav closed 2 years ago

YachYaroslav commented 2 years ago

I had a condition with "'Validation error: Paid amount does not match order amount..." on line 296 in \Paynl\Payment\Controller\Checkout\Exchange class, but rather than receiving a good message including $transactionPaid array and grand total of an order I got

main.CRITICAL: Notice: Undefined property: Paynl\Payment\Controller\Checkout\Exchange\Interceptor::$logger in /data/web/deployer_production/releases/50/vendor/paynl/magento2-plugin/Controller/Checkout/Exchange.php on line 296 {"report_id":"3baeaf7cf255b3c59138bc4711a762ceb4c2f0bae933d3022d4cd51e23f94214","exception":"[object] (Exception(code: 0): Notice: Undefined property: Paynl\\Payment\\Controller\\Checkout\\Exchange\\Interceptor::$logger in /data/web/deployer_production/releases/50/vendor/paynl/magento2-plugin/Controller/Checkout/Exchange.php on line 296 at /data/web/deployer_production/releases/50/vendor/magento/framework/App/ErrorHandler.php:61)"} []

Please, fix that by replacing 'logger' with your new approach of static method usage payHelper::logDebug or payHelper::logCritical.

Pay.nl version: 2.7.0 Magento CE version: 2.4.2-p2

woutse commented 2 years ago

Thanks for your message. Noted. This will be fixed a.s.a.p.

woutse commented 2 years ago

This is fixed in release 2.7.1. Again, thanks for reporting!