mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
98 stars 49 forks source link

Invalid Payment Token #789

Open sm131313 opened 1 week ago

sm131313 commented 1 week ago

Describe the bug We receive exception.log invalid payment token.

Used versions

To Reproduce We see it in our exception.log repeatedly. Customer placed with SOFORT Banking and did not succeed to proceed order (cancelled). At second attempt customer could complete order without any error/issue.

Expected behavior Should not have this error

Exception.log below

#28 {main} {"report_id":"8198067a907f238b976f3be26984e1572aeb1ae4111fda959321af327fe0f356","exception":"[object] (Magento\\Framework\\Exception\\AuthorizationException(code: 0): Invalid payment token at /cache/vendor/mollie/magento2/Service/Mollie/ValidateProcessRequest.php:74)"} []
[2024-06-19T06:34:24.920678+00:00] main.CRITICAL: Magento\Framework\Exception\AuthorizationException: Invalid payment token in /cache/vendor/mollie/magento2/Service/Mollie/ValidateProcessRequest.php:74
Stack trace:
#0 /cache/vendor/mollie/magento2/Controller/Checkout/Process.php(110): Mollie\Payment\Service\Mollie\ValidateProcessRequest->execute()
#1 /cache/vendor/magento/framework/Interception/Interceptor.php(58): Mollie\Payment\Controller\Checkout\Process->execute()
#2 /cache/vendor/magento/framework/Interception/Interceptor.php(138): Mollie\Payment\Controller\Checkout\Process\Interceptor->___callParent('execute', Array)
#3 /cache/vendor/magento/framework/Interception/Interceptor.php(153): Mollie\Payment\Controller\Checkout\Process\Interceptor->Magento\Framework\Interception\{closure}()
#4 /cache/generated/code/Mollie/Payment/Controller/Checkout/Process/Interceptor.php(23): Mollie\Payment\Controller\Checkout\Process\Interceptor->___callPlugins('execute', Array, Array)
#5 /cache/vendor/magento/framework/App/Action/Action.php(111): Mollie\Payment\Controller\Checkout\Process\Interceptor->execute()
#6 /cache/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#7 /cache/vendor/magento/framework/Interception/Interceptor.php(138): Mollie\Payment\Controller\Checkout\Process\Interceptor->___callParent('dispatch', Array)
#8 /cache/vendor/magento/framework/Interception/Interceptor.php(153): Mollie\Payment\Controller\Checkout\Process\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#9 /cache/generated/code/Mollie/Payment/Controller/Checkout/Process/Interceptor.php(32): Mollie\Payment\Controller\Checkout\Process\Interceptor->___callPlugins('dispatch', Array, Array)
#10 /cache/vendor/magento/framework/App/FrontController.php(245): Mollie\Payment\Controller\Checkout\Process\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#11 /cache/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse(Object(Mollie\Payment\Controller\Checkout\Process\Interceptor), Object(Magento\Framework\App\Request\Http))
#12 /cache/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Mollie\Payment\Controller\Checkout\Process\Interceptor))
#13 /cache/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#14 /cache/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#15 /cache/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))
#16 /cache/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))
#17 /cache/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#18 /cache/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))
#19 /cache/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#20 /cache/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#21 /cache/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /cache/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#23 /cache/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent('launch', Array)
#24 /cache/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#25 /cache/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
#26 /cache/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#27 /cache/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#28 {main} {"report_id":"8198067a907f238b976f3be26984e1572aeb1ae4111fda959321af327fe0f356","exception":"[object] (Magento\\Framework\\Exception\\AuthorizationException(code: 0): Invalid payment token at /cache/vendor/mollie/magento2/Service/Mollie/ValidateProcessRequest.php:74)"} []

And reports logfile

{
   "0":"Invalid payment token",
   "1":"#1 Mollie\\Payment\\Controller\\Checkout\\Process->execute() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#2 Mollie\\Payment\\Controller\\Checkout\\Process\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#3 Mollie\\Payment\\Controller\\Checkout\\Process\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#4 Mollie\\Payment\\Controller\\Checkout\\Process\\Interceptor->___callPlugins() called at [generated\/code\/Mollie\/Payment\/Controller\/Checkout\/Process\/Interceptor.php:23]\n#5 Mollie\\Payment\\Controller\\Checkout\\Process\\Interceptor->execute() called at [vendor\/magento\/framework\/App\/Action\/Action.php:111]\n#6 Magento\\Framework\\App\\Action\\Action->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#7 Mollie\\Payment\\Controller\\Checkout\\Process\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#8 Mollie\\Payment\\Controller\\Checkout\\Process\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#9 Mollie\\Payment\\Controller\\Checkout\\Process\\Interceptor->___callPlugins() called at [generated\/code\/Mollie\/Payment\/Controller\/Checkout\/Process\/Interceptor.php:32]\n#10 Mollie\\Payment\\Controller\\Checkout\\Process\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/FrontController.php:245]\n#11 Magento\\Framework\\App\\FrontController->getActionResponse() called at [vendor\/magento\/framework\/App\/FrontController.php:212]\n#12 Magento\\Framework\\App\\FrontController->processRequest() called at [vendor\/magento\/framework\/App\/FrontController.php:147]\n#13 Magento\\Framework\\App\\FrontController->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#14 Magento\\Framework\\App\\FrontController\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#15 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-store\/App\/FrontController\/Plugin\/RequestPreprocessor.php:99]\n#16 Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#17 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-page-cache\/Model\/App\/FrontController\/BuiltinPlugin.php:71]\n#18 Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#19 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#20 Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php:23]\n#21 Magento\\Framework\\App\\FrontController\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/Http.php:116]\n#22 Magento\\Framework\\App\\Http->launch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#23 Magento\\Framework\\App\\Http\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#24 Magento\\Framework\\App\\Http\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#25 Magento\\Framework\\App\\Http\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php:23]\n#26 Magento\\Framework\\App\\Http\\Interceptor->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:264]\n#27 Magento\\Framework\\App\\Bootstrap->run() called at [pub\/index.php:30]\n",
   "url":"\/mollie\/checkout\/process\/?order_id=XXXXX&payment_token=4oMMF5SQjzzvCrHvbPklWQY8PACkYFpZ&utm_nooverride=1",
   "script_name":"\/index.php",
   "report_id":"8198067a907f238b976f3be26984e1572aeb1ae4111fda959321af327fe0f356"
}

(note i replaced the order_id above to XXXXX)

Frank-Magmodules commented 6 days ago

Hi there @sm131313,

Thank you for opening this issue. As we are not able to reproduce it on our end, could you please share your environment details and provide the exact steps to reproduce the problem? I'm happy to take a look with you to figure out what's going wrong.

Thank you!