Problem:

  • After finishing the checkout process, the message "Payment failed" appears, but the buyer still gets charged.
  • No new order is saved in Magento.
  • The ops.log might show the error message "The data you entered is not correct".


Possible cause:

This can happen when an exception occurs while saving the order. However, at this time the payment data has already been sent to the payment provider, therefore the buyer gets charged.


The module then sends the request to the payment provider again, which causes the error "The data you entered is not correct" because the order ID has already been used in the previous request. This error is therefore the consequence of the exception and not the actual cause of the problem.


Solution:

All available log files need to be checked to see where exactly the exception occurs and what causes it.


Many times, 3rd-party modules are causing this, e.g. when they try to perform actions via their "sales_order_place_after" observer.