3

In Magento ver. 2.2.4 when I try to make a payment with a credit card or by Bank Transfer this exception is generated. With PayPal this does not happen and I can place orders without problems.

2018-07-11 13:50:40] main.CRITICAL: Rolled back transaction has not been completed correctly. {"exception":"[object] (Exception(code: 0): Rolled back transaction has not been completed correctly. at /home/wwwdos9/public_html/.../vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:270)"}

7
  • Now show me other error. Unique constraint violation found
    – Juan Dosil
    Commented Jul 11, 2018 at 15:20
  • Can you show the full error?
    – Greg
    Commented Jul 11, 2018 at 16:16
  • I do not get more information either in debug.log, or in exception.log or in system.log. Where can I see the transaction that is generating the error?
    – Juan Dosil
    Commented Jul 12, 2018 at 8:18
  • Next Zend_Db_Statement_Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1200022450-1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was: INSERT INTO sales_order (state, status, protect_code, shipping_description, is_virtual, store_id, customer_id, base_discount_amount, base_grand_total, base_shipping_amount, base_shipping_tax_amount, base_subtotal, base_tax_amount, base_to_global_rate, base_to_order_rate, discount_amount, grand_total, shipping_amount, shipping_tax_amount, store_to_base_rate
    – Juan Dosil
    Commented Jul 12, 2018 at 10:57
  • If you remove this order 1200022450-1 from sales_order table, it should solve the problem.
    – Greg
    Commented Jul 12, 2018 at 11:08

2 Answers 2

0

This error is regrading in 'banktransfer' extension in some database transaction performing on order time.

Things to check

  • This error generally said that, your code is breaking database operation.
  • Make sure saving data is properly loaded with that model.
  • Note that save method is particularly calling model which you are loaded to save data.

This is the things you have to keep in mind.
I hope this will be helpful.

4
  • hello @Himanshu. I am facing this issue when i try to place the order using sagepay payment method
    – Manjunath
    Commented Jul 22, 2019 at 7:04
  • @Manjunath which event is calling please try to use *_commit_after event
    – Himanshu
    Commented Jul 22, 2019 at 7:13
  • yes, I checked in the sagepay module, they are using this event, "checkout_submit_all_after"
    – Manjunath
    Commented Jul 22, 2019 at 7:18
  • @Himanshu can you help me on this issue please magento.stackexchange.com/questions/293795/… Commented Oct 25, 2019 at 13:48
0

We have been experiencing this issue across all of our Magento 2 sites. For us, switching off persistent cart (Store > Configuration > Customer > Persistent Shopping Cart) solved the issue. I really hope Magento can fix persistent cart, though, as we'd like to be able to use it again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.