Giter VIP home page Giter VIP logo

magento-1-deprecated's People

Contributors

16hands avatar alex-overdose avatar alexrohloff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento-1-deprecated's Issues

Specified tax amount is invalid.

I simply integrated the extension without any problem, but upon clicking "place order" there is an error where it prevents the customers from reaching laybuy page

Sorry there was an Error redirecting you to Laybuy: ERROR (Specified tax amount is invalid.)

When I reviewed the logs I have seen this:

2019-03-21T02:31:16+00:00 DEBUG (7): 5c92f7732f2c3 --  Laybuy_Payments_Model_Payments::setupLaybuy CLIENT INIT: 104052:UWgejQo7E42nZV4TMTzXPwngenZdNSQRr2w94VMGRS1V3hBsgm78sqJG8xesTcqg
2019-03-21T02:31:16+00:00 DEBUG (7): 5c92f7732f2c3 --  Laybuy_Payments_Model_Payments::setupLaybuy SETUP COMPLETE 
2019-03-21T02:31:17+00:00 DEBUG (7): 5c92f7732f2c3 --  stdClass Object
(
    [result] => ERROR
    [error] => Specified tax amount is invalid.
)

2019-03-21T02:31:17+00:00 DEBUG (7): 5c92f7732f2c3 --  LAYBUY: ORDER CREATE FAILED (ERROR -> Specified tax amount is invalid.) 
2019-03-21T02:31:17+00:00 DEBUG (7): 5c92f7732f2c3 --  LAYBUY: ORDER CREATE FAILED, found quote 213151

Now I am not quite sure if this a problem from our side or laybuy servers not taking ZERO Taxes value.

Success Page missing the order data!

After placing the order you get only the headline, but the following does not return with the proper data:

<?php if ($this->getOrderId()):?>
<?php if ($this->getCanViewOrder()) :?>

And because of this, the customer cannot see the order number nor the thank you message!

Clicking browser back button after order placed can result in order being deleted

Preconditions

  • Magento 1.9.2.0
  • PHP 5.6.34
  • Latest version of Laybuy extension (0.1.0)

Steps to reproduce

  1. Place order in Magento with Laybuy payment method
  2. Complete Laybuy payment information
  3. Finish payment and return to Magento order confirmation page
  4. Click browser back button to return to Laybuy
  5. On Laybuy error page click the button to return to Magento

Expected behaviour

Unsure, maybe a Magento error page or a page saying the payment has already been processed

Actual behaviour

The second time the user returns to Magento the response contains an error, therefore the order is deleted from Magento. The initial payment remains in Laybuy but it no longer has a matching order in Magento.

Products not being added back to system after deleted order

Using magento 1.9.3.8

If you cancel a payment (or get declined). Your items are not added back into the system. For example your try to purchase product A with qty of 1. The order is created and the qty becomes 0. If the order is deleted you get returned to the cart but the qty is zero so the user cannot try again. In our case the user gets a message saying sorry some of your products are out of stock.

HTTP error 500 after checking out using Laybuy

Hi Carl,

I was investigating an issue for a client, where customers saw the HTTP 500 error page after checking out using Laybuy from Magento.

Here is the stack trace for multiple occurrences:

[Tue Sep 12 12:36:42 2017] [error] [client 121.99.181.227]
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Mage_Payment_Helper_Data::getInfoBlock() must be an instance of Mage_Payment_Model_Info, boolean given, called in app/code/core/Mage/Sales/Model/Order.php on line 1269 and defined in app/code/core/Mage/Payment/Helper/Data.php:117
Stack trace:
#0 app/code/core/Mage/Sales/Model/Order.php(1269): Mage_Payment_Helper_Data->getInfoBlock(false)
#1 app/code/community/Laybuy/Payments/controllers/PaymentController.php(88): Mage_Sales_Model_Order->sendNewOrderEmail()
#2 app/code/core/Mage/Core/Controller/Varien/Action.php(419): Laybuy_Payments_PaymentController->responseAction()
#3 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('response')
#4 app/code/core/Mage/Core/Controller/Vari in app/code/core/Mage/Payment/Helper/Data.php on line 117, referer: https://payment.laybuy.com/pay/ICOZQUAKYBUE1gCaVxgRzeRPcu6kCmoOVBQlhOZG

[Tue Sep 12 12:36:51 2017] [error] [client 121.99.181.227]
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Mage_Payment_Helper_Data::getInfoBlock() must be an instance of Mage_Payment_Model_Info, boolean given, called in app/code/core/Mage/Sales/Model/Order.php on line 1269 and defined in app/code/core/Mage/Payment/Helper/Data.php:117
Stack trace:
#0 app/code/core/Mage/Sales/Model/Order.php(1269): Mage_Payment_Helper_Data->getInfoBlock(false)
#1 app/code/community/Laybuy/Payments/controllers/PaymentController.php(88): Mage_Sales_Model_Order->sendNewOrderEmail()
#2 app/code/core/Mage/Core/Controller/Varien/Action.php(419): Laybuy_Payments_PaymentController->responseAction()
#3 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('response')
#4 app/code/core/Mage/Core/Controller/Vari in app/code/core/Mage/Payment/Helper/Data.php on line 117

[Tue Sep 12 12:37:51 2017] [error] [client 121.99.32.138]
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Mage_Payment_Helper_Data::getInfoBlock() must be an instance of Mage_Payment_Model_Info, boolean given, called in app/code/core/Mage/Sales/Model/Order.php on line 1269 and defined in app/code/core/Mage/Payment/Helper/Data.php:117
Stack trace:
#0 app/code/core/Mage/Sales/Model/Order.php(1269): Mage_Payment_Helper_Data->getInfoBlock(false)
#1 app/code/community/Laybuy/Payments/controllers/PaymentController.php(88): Mage_Sales_Model_Order->sendNewOrderEmail()
#2 app/code/core/Mage/Core/Controller/Varien/Action.php(419): Laybuy_Payments_PaymentController->responseAction()
#3 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('response')
#4 app/code/core/Mage/Core/Controller/Vari in app/code/core/Mage/Payment/Helper/Data.php on line 117, referer: https://payment.laybuy.com/pay/UnVaEAy1exJZh15XlYmNXfSGi8ZIB4XL3fV1SfuI

[Tue Sep 12 12:38:02 2017] [error] [client 121.99.32.138]
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Mage_Payment_Helper_Data::getInfoBlock() must be an instance of Mage_Payment_Model_Info, boolean given, called in app/code/core/Mage/Sales/Model/Order.php on line 1269 and defined in app/code/core/Mage/Payment/Helper/Data.php:117
Stack trace:
#0 app/code/core/Mage/Sales/Model/Order.php(1269): Mage_Payment_Helper_Data->getInfoBlock(false)
#1 app/code/community/Laybuy/Payments/controllers/PaymentController.php(88): Mage_Sales_Model_Order->sendNewOrderEmail()
#2 app/code/core/Mage/Core/Controller/Varien/Action.php(419): Laybuy_Payments_PaymentController->responseAction()
#3 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('response')
#4 app/code/core/Mage/Core/Controller/Vari in app/code/core/Mage/Payment/Helper/Data.php on line 117, referer: https://payment.laybuy.com/pay/UnVaEAy1exJZh15XlYmNXfSGi8ZIB4XL3fV1SfuI

[Tue Sep 12 12:38:20 2017] [error] [client 121.99.32.138]
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Mage_Payment_Helper_Data::getInfoBlock() must be an instance of Mage_Payment_Model_Info, boolean given, called in app/code/core/Mage/Sales/Model/Order.php on line 1269 and defined in app/code/core/Mage/Payment/Helper/Data.php:117
Stack trace:
#0 app/code/core/Mage/Sales/Model/Order.php(1269): Mage_Payment_Helper_Data->getInfoBlock(false)
#1 app/code/community/Laybuy/Payments/controllers/PaymentController.php(88): Mage_Sales_Model_Order->sendNewOrderEmail()
#2 app/code/core/Mage/Core/Controller/Varien/Action.php(419): Laybuy_Payments_PaymentController->responseAction()
#3 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('response')
#4 app/code/core/Mage/Core/Controller/Vari in app/code/core/Mage/Payment/Helper/Data.php on line 117, referer: https://payment.laybuy.com/pay/UnVaEAy1exJZh15XlYmNXfSGi8ZIB4XL3fV1SfuI

I tried to replicate the issue on the staging site, but the checking out process succeeded without this issue on staging.

After some code digging, I came up with the following theory:

See
https://github.com/Laybuy/Magento1/blob/bb83ec054d13866187092042505efeacf37f8c13/app/code/community/Laybuy/Payments/controllers/PaymentController.php#L85

The order object is supposed to be populated with data by the loadByIncrementId() method. However, it might fail silently and leave an empty order object if the provided increment id is not valid somehow.

https://github.com/Laybuy/Magento1/blob/bb83ec054d13866187092042505efeacf37f8c13/app/code/community/Laybuy/Payments/controllers/PaymentController.php#L88

In the following call to Mage_Sales_Model_Order->sendNewOrderEmail(), Mage_Sales_Model_Order->getPayment() was called but can only return false due the failure of order loading. The false value is then passed to Mage::helper('payment')->getInfoBlock() in Mage_Sales_Model_Order->sendNewOrderEmail(), which trigger the fatal error above in the stack trace.

I found that the reserved the order increment id in the quote is different from the actual order increment id. Maybe that's worth investigation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.