Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
155 stars 211 forks source link

[PW-2384] Uncaught Error: Call to a member function getAdditionalInformation() on null in /vendor/adyen/module-payment/Model/AdyenThreeDS2Process.php:97 #672

Closed haelbichalex closed 4 years ago

haelbichalex commented 4 years ago

Describe the bug I'm trying to follow these steps to integrate Adyen into our Vue Storefront PWA and failing on step 4: https://docs.adyen.com/plugins/magento-2/magento-pwa-storefront

Magento delivers the following error:

Fatal Error: 'Uncaught Error: Call to a member function getAdditionalInformation() on null in \/app\/web\/vendor\/adyen\/module-payment\/Model\/AdyenThreeDS2Process.php:97\nStack trace:\n#0 [internal function]: Adyen\\Payment\\Model\\AdyenThreeDS2Process->initiate(Array)\n#1 \/app\/web\/vendor\/magento\/module-webapi\/Controller\/Rest\/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)\n#2 \/app\/web\/vendor\/magento\/module-webapi\/Controller\/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))\n#3 \/app\/web\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#4 \/app\/web\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callParent('dispatch', Array)\n#5 \/app\/web\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Webapi\\Controller\\Rest\\Interceptor->Magento\\Framework\\Interception\\{closure}' in '\/app\/web\/vendor\/adyen\/module-payment\/Model\/AdyenThreeDS2Process.php' on line 97

This happens because I cannot get the lastRealOrderId here, since as I now, there is no checkoutSession ?! Is this really a bug or am I doing something wrong?

To Reproduce Steps to reproduce the behavior:

  1. Install Vue Storefront
  2. Create Order
  3. Post to /V1/adyen/threeDS2Process
  4. See error in Magento var/report/api/

Expected behavior It should return a correct response

cyattilakiss commented 4 years ago

Hi @haelbichalex ,

Thank you for raising this issue. I reviewed it and this is a potential bug. I created an item in our backlog to fix this but please let me know if you would like to contribute and I'm going to send you all the necessary steps.

Best, Attila Adyen

cyattilakiss commented 4 years ago

Hi @haelbichalex ,

We have just released the fix for this issue. Thank you again for you input. I will close this thread for now, but feel free to reopen it if necessary!

Best, Attila Adyen