wallee-payment / magento-2

Wallee integration for Magento 2.3 and later
https://wallee.com
Apache License 2.0
3 stars 3 forks source link

Capture payment function is missed after the module upgraded 1.3.11 -> 2.1.3 on Magento 2.4.6-p2 #32

Open ant0x64 opened 1 year ago

ant0x64 commented 1 year ago

After upgrading Magento to 2.4.6-p2 and "wallee-payment/magento-2" from 1.3.11 to 2.1.3 module, we faced a critical issue.

There is no payment capture function in the module, neither on the order edit page nor on the invoice page. Instead, payment accept/decline events are displayed on the order page, which in turn crashes with a critical error

[2023-09-26T08:04:22.696875+00:00] main.CRITICAL: Error: Call to a member function getId() on bool in /vendor/wallee/magento-2/Model/Service/Order/TransactionService.php:526
Stack trace:
#0 /vendor/wallee/magento-2/Gateway/Command/AcceptPaymentCommand.php(43): Wallee\Payment\Model\Service\Order\TransactionService->accept()
#1 /vendor/magento/module-payment/Model/Method/Adapter.php(549): Wallee\Payment\Gateway\Command\AcceptPaymentCommand->execute()
#2 /vendor/magento/module-payment/Model/Method/Adapter.php(508): Magento\Payment\Model\Method\Adapter->executeCommand()
#3 /vendor/magento/module-sales/Model/Order/Payment.php(935): Magento\Payment\Model\Method\Adapter->acceptPayment()
#4 /vendor/magento/module-sales/Controller/Adminhtml/Order/ReviewPayment.php(41): Magento\Sales\Model\Order\Payment->accept()
#5 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment->execute()
#6 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->___callParent()
#7 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->Magento\Framework\Interception\{closure}()
#8 /generated/code/Magento/Sales/Controller/Adminhtml/Order/ReviewPayment/Interceptor.php(23): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->___callPlugins()
#9 /vendor/magento/framework/App/Action/Action.php(111): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->execute()
#10 /vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch()
#11 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch()
#12 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->___callParent()
#13 /vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->Magento\Framework\Interception\{closure}()
#14 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch()
#15 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->Magento\Framework\Interception\{closure}()
#16 /generated/code/Magento/Sales/Controller/Adminhtml/Order/ReviewPayment/Interceptor.php(32): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->___callPlugins()
#17 /vendor/magento/framework/App/FrontController.php(245): Magento\Sales\Controller\Adminhtml\Order\ReviewPayment\Interceptor->dispatch()
#18 /vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#19 /vendor/magento/framework/App/FrontController.php(146): Magento\Framework\App\FrontController->processRequest()
#20 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#21 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#22 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#23 /generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#24 /vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#25 /generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#26 /vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#27 /pub/index.php(32): Magento\Framework\App\Bootstrap->run()
#28 {main} {"exception":"[object] (Error(code: 0): Call to a member function getId() on bool at /vendor/wallee/magento-2/Model/Service/Order/TransactionService.php:526)"} []