payfort / magento2-payfort

magento2 payfort plugin
MIT License
10 stars 25 forks source link

Host to Host url give fatal error in magento 2 #11

Open aboutzahurul opened 5 years ago

aboutzahurul commented 5 years ago

We are getting fatal error in production server, then we try after setup fresh magento 2.1.9 with sample data installed the payfort module 1.3.1 then whenever we go to host to host url (https://yourdomain.com/payfortfort/payment/response) it gives fatal error.

Fatal error: Uncaught Error: Call to a member function getMethod() on null in /home/user/public_html/app/code/Payfort/Fort/Controller/Payment/Response.php:14 Stack trace: #0 /home/user/public_html/vendor/magento/framework/App/Action/Action.php(102): Payfort\Fort\Controller\Payment\Response->execute() #1 /home/user/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http)) #2 /home/user/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Payfort\Fort\Controller\Payment\Response\Interceptor->___callParent('dispatch', Array) #3 /home/user/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Payfort\\Fort\\Co...', 'dispatch', Object(Payfort\Fort\Controller\Payment\Response\Interceptor), Array, 'contextPlugin') #4 /home/user/public_html/vendor/magento/module-store/App/Action/Plugin/ in /home/user/public_html/app/code/Payfort/Fort/Controller/Payment/Response.php on line 14

this host to host url should be error free even there is no payment related response or query from payfort payment gateway cos this url is publicly available under your website.

This fatal error also happen if you have multi store view like "english" and "arabic" on your magento 2 website. on that case host to host url is: https://yourdomain.com/en/payfortfort/payment/response https://yourdomain.com/ar/payfortfort/payment/response

DeyaZ88 commented 5 years ago

Hi @aboutzahurul , we will check the issue on the version you mentioned and come back to you.