cancel
Showing results for 
Search instead for 
Did you mean: 

M2.2.2, Fatal Error after returning to order confirmation page from Paypal during checkout

M2.2.2, Fatal Error after returning to order confirmation page from Paypal during checkout

M2.2.2, Fatal Error after returning to order confirmation page from Paypal during checkout

 

I have recently began experiencing an error during checkout in Magento 2.2.2; when you proceed to checkout using paypal (currently using the GeneCommerce paypal extension), all goes well until you finish up on the paypal website, I receive the error below when I land on what should be the Order Review page, the last step of checkout. Can anyone recommend a possible fix?

 

Fatal error: Uncaught Error: Call to a member function setQuote() on boolean in /home/hrothgar/public_html/vendor/paypal/module-braintree/Controller/Paypal/Review.php:81 Stack trace: #0 /home/hrothgar/public_html/generated/code/Magento/Braintree/Controller/Paypal/Review/Interceptor.php(24): Magento\Braintree\Controller\Paypal\Review->execute() #1 /home/hrothgar/public_html/vendor/magento/framework/App/Action/Action.php(107): Magento\Braintree\Controller\Paypal\Review\Interceptor->execute() #2 /home/hrothgar/public_html/vendor/paypal/module-braintree/Controller/Paypal/AbstractAction.php(66): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http)) #3 /home/hrothgar/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Braintree\Controller\Paypal\AbstractAction>dispatch(Object(Magento\Framework\App\Request\Http)) #4 /home/hrothgar/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Braintree\Controller\Paypal\Review\Interceptor->___ in /home/hrothgar/public_html/vendor/paypal/module-braintree/Controller/Paypal/Review.php on line 81

 

2 REPLIES 2

Re: M2.2.2, Fatal Error after returning to order confirmation page from Paypal during checkout

Hello @hrothgar22 

 

Have you override any paypal file or in your theme if overridden already please run below commands:

rm -rf generated/code/*
chmod -R 0777 var/ pub/ generated/
php bin/magento setup:di:compile

Try it once and let me know if any luck. Thanks

Manish Mittal
https://www.manishmittal.com/

Re: M2.2.2, Fatal Error after returning to order confirmation page from Paypal during checkout

Hello Manish and thank you for the reply! Yes, I had modified one of the files related to my paypal checkout, but I immediately reverted the change back  to normal, and noticed this problem afterwards. I have attempted the solution you provided but had no luck unfortunately, after removing generated/code/* and re-compiling, the problem persists.