maksuturva / magento2_payment_module

Svea Payment module for Magento 2
Other
4 stars 13 forks source link

Payment module does not work on M2.4.5 + PHP 8.1 #51

Closed Svea-Maintainer closed 2 years ago

Svea-Maintainer commented 2 years ago

The module does not work on M2.4.5+PHP8.1

Platform: Magento 2.4.5 CE + PHP 8.1

`[2022-10-30T13:33:20.890184+00:00] main.ERROR: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php on line 220 [] [] [2022-10-30T13:33:20.891180+00:00] main.CRITICAL: Exception: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php on line 220 in /var/www/html/vendor/magento/framework/App/ErrorHandler.php:62 Stack trace:

0 [internal function]: Magento\Framework\App\ErrorHandler->handler(8192, 'explode(): Pass...', '/var/www/html/a...', 220)

1 /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php(220): explode(';', NULL)

2 /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php(66): Svea\Maksuturva\Model\Config\Config->formatValue(Array)

3 /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php(193): Svea\Maksuturva\Model\Config\Config->getCardHandlingFee(1)

4 /var/www/html/app/code/Svea/Maksuturva/Model/Quote/Total/HandlingFee.php(96): Svea\Maksuturva\Model\Config\Config->getHandlingFee(1)

5 /var/www/html/app/code/Svea/Maksuturva/Model/Quote/Total/HandlingFee.php(79): Svea\Maksuturva\Model\Quote\Total\HandlingFee->resolveConfiguredHandlingFee(1, 'maksuturva_coll...', 'FI01', 'pay_now_bank')

6 /var/www/html/app/code/Svea/Maksuturva/Model/Quote/Total/HandlingFee.php(50): Svea\Maksuturva\Model\Quote\Total\HandlingFee->calculateHandlingFee(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Total))

7 /var/www/html/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(261): Svea\Maksuturva\Model\Quote\Total\HandlingFee->collect(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote\Address\Total))

8 /var/www/html/generated/code/Magento/Quote/Model/Quote/TotalsCollector/Interceptor.php(41): Magento\Quote\Model\Quote\TotalsCollector->collectAddressTotals(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))

9 /var/www/html/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(156): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->collectAddressTotals(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))

10 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\Quote\TotalsCollector->collect(Object(Magento\Quote\Model\Quote\Interceptor))

11 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callParent('collect', Array)

12 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Quote\Model\Quote\Interceptor))

13 /var/www/html/generated/code/Magento/Quote/Model/Quote/TotalsCollector/Interceptor.php(32): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callPlugins('collect', Array, Array)

14 /var/www/html/vendor/magento/module-quote/Model/Quote.php(2015): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->collect(Object(Magento\Quote\Model\Quote\Interceptor))

15 /var/www/html/generated/code/Magento/Quote/Model/Quote/Interceptor.php(743): Magento\Quote\Model\Quote->collectTotals()

16 /var/www/html/app/code/Svea/Maksuturva/Model/HandlingFeeApplier.php(38): Magento\Quote\Model\Quote\Interceptor->collectTotals()

17 /var/www/html/app/code/Svea/Maksuturva/Controller/Checkout/ApplyPaymentMethod.php(79): Svea\Maksuturva\Model\HandlingFeeApplier->updateHandlingFee(Object(Magento\Quote\Model\Quote\Interceptor), 'maksuturva_coll...', 'FI01', 'pay_now_bank')

18 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod->execute()

19 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor->___callParent('execute', Array)

20 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor->Magento\Framework\Interception{closure}()

21 /var/www/html/generated/code/Svea/Maksuturva/Controller/Checkout/ApplyPaymentMethod/Interceptor.php(23): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor->___callPlugins('execute', Array, Array)

22 /var/www/html/vendor/magento/framework/App/Action/Action.php(111): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor->execute()

23 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

24 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor->___callParent('dispatch', Array)

25 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

26 /var/www/html/generated/code/Svea/Maksuturva/Controller/Checkout/ApplyPaymentMethod/Interceptor.php(32): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor->___callPlugins('dispatch', Array, Array)

27 /var/www/html/vendor/magento/framework/App/FrontController.php(245): Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

28 /var/www/html/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse(Object(Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor), Object(Magento\Framework\App\Request\Http))

29 /var/www/html/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Svea\Maksuturva\Controller\Checkout\ApplyPaymentMethod\Interceptor))

30 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

31 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

32 /var/www/html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

33 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

34 /var/www/html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(75): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

35 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

36 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

37 /var/www/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)

38 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

39 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()

40 /var/www/html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()

41 /var/www/html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

42 {main} {"report_id":"c9087276e0ac004c2dce641e30d7f3b3a5d6ebdea4198ecb1f86ea61c7198af0"} []

[2022-10-30T13:33:24.255206+00:00] main.CRITICAL: Exception: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php on line 220 in /var/www/html/vendor/magento/framework/App/ErrorHandler.php:62 Stack trace:

0 [internal function]: Magento\Framework\App\ErrorHandler->handler(8192, 'explode(): Pass...', '/var/www/html/a...', 220)

1 /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php(220): explode(';', NULL)

2 /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php(66): Svea\Maksuturva\Model\Config\Config->formatValue(Array)

3 /var/www/html/app/code/Svea/Maksuturva/Model/Config/Config.php(193): Svea\Maksuturva\Model\Config\Config->getCardHandlingFee(1)

4 /var/www/html/app/code/Svea/Maksuturva/Model/Quote/Total/HandlingFee.php(96): Svea\Maksuturva\Model\Config\Config->getHandlingFee(1)

5 /var/www/html/app/code/Svea/Maksuturva/Model/Quote/Total/HandlingFee.php(79): Svea\Maksuturva\Model\Quote\Total\HandlingFee->resolveConfiguredHandlingFee(1, 'maksuturva_coll...', NULL, NULL)

6 /var/www/html/app/code/Svea/Maksuturva/Model/Quote/Total/HandlingFee.php(50): Svea\Maksuturva\Model\Quote\Total\HandlingFee->calculateHandlingFee(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Total))

7 /var/www/html/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(261): Svea\Maksuturva\Model\Quote\Total\HandlingFee->collect(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote\Address\Total))

8 /var/www/html/generated/code/Magento/Quote/Model/Quote/TotalsCollector/Interceptor.php(41): Magento\Quote\Model\Quote\TotalsCollector->collectAddressTotals(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))

9 /var/www/html/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(156): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->collectAddressTotals(Object(Magento\Quote\Model\Quote\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))

10 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\Quote\TotalsCollector->collect(Object(Magento\Quote\Model\Quote\Interceptor))

11 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callParent('collect', Array)

12 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Quote\Model\Quote\Interceptor))

13 /var/www/html/generated/code/Magento/Quote/Model/Quote/TotalsCollector/Interceptor.php(32): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callPlugins('collect', Array, Array)

14 /var/www/html/vendor/magento/module-quote/Model/Quote.php(2015): Magento\Quote\Model\Quote\TotalsCollector\Interceptor->collect(Object(Magento\Quote\Model\Quote\Interceptor))

15 /var/www/html/generated/code/Magento/Quote/Model/Quote/Interceptor.php(743): Magento\Quote\Model\Quote->collectTotals()

16 /var/www/html/vendor/magento/module-quote/Model/Quote/Payment.php(187): Magento\Quote\Model\Quote\Interceptor->collectTotals()

17 /var/www/html/vendor/magento/module-quote/Model/PaymentMethodManagement.php(79): Magento\Quote\Model\Quote\Payment->importData(Object(Magento\Framework\DataObject))

18 /var/www/html/vendor/magento/module-quote/Model/GuestCart/GuestPaymentMethodManagement.php(49): Magento\Quote\Model\PaymentMethodManagement->set('3', Object(Magento\Quote\Model\Quote\Payment))

19 /var/www/html/vendor/magento/module-checkout/Model/GuestPaymentInformationManagement.php(183): Magento\Quote\Model\GuestCart\GuestPaymentMethodManagement->set('E4smtpTDEnl8lcn...', Object(Magento\Quote\Model\Quote\Payment))

20 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\GuestPaymentInformationManagement->savePaymentInformation('E4smtpTDEnl8lcn...', 'pub@henet.fi', Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))

21 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->___callParent('savePaymentInfo...', Array)

22 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->Magento\Framework\Interception{closure}('E4smtpTDEnl8lcn...', 'pub@henet.fi', Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))

23 /var/www/html/generated/code/Magento/Checkout/Model/GuestPaymentInformationManagement/Interceptor.php(32): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)

24 /var/www/html/vendor/magento/module-checkout/Model/GuestPaymentInformationManagement.php(122): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->savePaymentInformation('E4smtpTDEnl8lcn...', 'pub@henet.fi', Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))

25 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\GuestPaymentInformationManagement->savePaymentInformationAndPlaceOrder('E4smtpTDEnl8lcn...', 'pub@henet.fi', Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))

26 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->___callParent('savePaymentInfo...', Array)

27 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->Magento\Framework\Interception{closure}('E4smtpTDEnl8lcn...', 'pub@henet.fi', Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))

28 /var/www/html/generated/code/Magento/Checkout/Model/GuestPaymentInformationManagement/Interceptor.php(23): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)

29 [internal function]: Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder('E4smtpTDEnl8lcn...', 'pub@henet.fi', Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address\Interceptor))

30 /var/www/html/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)

31 /var/www/html/vendor/magento/module-webapi/Controller/Rest.php(195): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))

32 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))

33 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)

34 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

35 /var/www/html/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)

36 /var/www/html/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

37 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()

38 /var/www/html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()

39 /var/www/html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

40 {main}`

Svea-Maintainer commented 2 years ago

Fixed in version 1.9.0