WooCommerce – Transactions failing due to extra item(s) being added to cart

I have an issue with our Woocommerce store and have totally hit a brick wall in figuring out the problem.

Here is a run down of the scenario and problem:

Read More
  • User adds any items to cart and proceeds to checkout
  • Not always, but usually they get this error message when they click ‘place order’:

Error Message: The transaction registration could not be completed due
to a missing or invalid parameter. Details: 3195 : The line item
amount details do not add up correctly.

  • They hit ‘place order’ again, and again and it either eventually lets them get to the checkout (because it didn’t add an extra item this time) or they give up and we lose the sale (some people attempt it 5 or more times before giving up)

If you have a look at the failed orders in the admin panel you can see that item(s) have been added to their cart that they didn’t put in.

How do we know they didn’t put them in? Because they are items from years ago that we do not sell any more and aren’t in the list of products anywhere – at all!

So, I have been troubleshooting for ages and have come up with a work around.

We have the “WooCommerce SagePayCw” plugin by customweb installed so that people can pay through Sage Pay. There is a setting in there called Cart:

During the checkout the cart can be sent to Sage Pay. The ordered
items will then be displayed in the Sage Pay account.

I have changed this to “NO” (don’t send the cart to SagePay) and the orders go through successfully – however the extra items are still being added to the order.

First thought – “oh dear, are they paying for the extra items that are being added to the cart without them realising?”

No, if you look at the order in the admin panel you can see all the totals add up wrong (or right) so they only pay what they are supposed to pay???

i.e.

  1. extra item: £10
  2. real item: £10
  3. real item: £10
  4. shipping: £5

TOTAL: £25.

However, this work around still shows the weird totals to the client on the order successful page and the completed order email – which is far from ideal as it will seriously confuse customers.

That’s about as far as I’ve got. If anyone can help me figure out what’s going on here and stop these extra products being added to the cart I’d really appreciate it.

Related posts

Leave a Reply

1 comment

  1. This has been fixed. Turns out that the woocommerce_order_items table was corrupted and had old order data from a previous website.

    Our current order numbers had caught up with the old order numbers and the old order items were being included in the order.