r-martins / PagBank-Magento1

Módulo PagSeguro (PagBank) para Magento 1.x e OpenMage LTS
https://pagseguro.ricardomartins.net.br/magento1.html
0 stars 0 forks source link

Fatal error: Uncaught Error: Call to a member function getQuote() #8

Closed tiagones closed 6 months ago

tiagones commented 6 months ago

Olá Ricardo,

São 3 erros similares relacionados aos métodos de pagamento PagBank.

Cartão de Crédito - PagBank Fatal error: Uncaught Error: Call to a member function getQuote() on boolean in /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Cc.php:158 Stack trace: #0 /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Cc.php(64): RicardoMartins_PagBank_Model_Method_Cc->getOrder() #1 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order/Payment.php(1035): RicardoMartins_PagBank_Model_Method_Cc->order(Object(Mage_Sales_Model_Order_Payment), 179) #2 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order/Payment.php(339): Mage_Sales_Model_Order_Payment->_order(179) #3 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order.php(896): Mage_Sales_Model_Order_Payment->place() #4 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order.php(1114): Mage_Sales_Model_Order->_placePayment() #5 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Core/Model/Resource/Transaction.php(105): Mage_Sales_Model_Order->place() #6 / in /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Cc.php on line 158

Boleto - PagBank Fatal error: Uncaught Error: Call to a member function getQuote() on boolean in /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Billet.php:124 Stack trace: #0 /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Billet.php(37): RicardoMartins_PagBank_Model_Method_Billet->getOrder() #1 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order/Payment.php(1035): RicardoMartins_PagBank_Model_Method_Billet->order(Object(Mage_Sales_Model_Order_Payment), 179) #2 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order/Payment.php(339): Mage_Sales_Model_Order_Payment->_order(179) #3 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order.php(896): Mage_Sales_Model_Order_Payment->place() #4 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order.php(1114): Mage_Sales_Model_Order->_placePayment() #5 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Core/Model/Resource/Transaction.php(105): Mage_Sales_Model_Ord in /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Billet.php on line 124

Pix - PagBank Fatal error: Uncaught Error: Call to a member function getQuote() on boolean in /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Pix.php:120 Stack trace: #0 /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Pix.php(37): RicardoMartins_PagBank_Model_Method_Pix->getOrder() #1 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order/Payment.php(1035): RicardoMartins_PagBank_Model_Method_Pix->order(Object(Mage_Sales_Model_Order_Payment), 179) #2 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order/Payment.php(339): Mage_Sales_Model_Order_Payment->_order(179) #3 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order.php(896): Mage_Sales_Model_Order_Payment->place() #4 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Sales/Model/Order.php(1114): Mage_Sales_Model_Order->_placePayment() #5 /home/tiago/sites/dhcp.magento1/app/code/core/Mage/Core/Model/Resource/Transaction.php(105): Mage_Sales_Model_Order->place() in /home/tiago/sites/dhcp.magento1/app/code/community/RicardoMartins/PagBank/Model/Method/Pix.php on line 120

O pedido não registrado no Backend.

Ambiente da minha loja:

Talvez será necessário fazer uma revisão geral no código do módulo para rodar em versões mais antigas do PHP.

ligiasalzano commented 6 months ago

Oi, @tiagones. Obrigada por reportar. Já encontramos o problema e estamos trabalhando nisso. Em breve publicaremos um novo release. Te avisaremos aqui.

r-martins commented 6 months ago

Relacionado ao PR #10

r-martins commented 6 months ago

Fechado no 4.0.4