Looking at the log of the session variables saved on both the failed and successful order, I see that sometimes a EcartSMC_OrderID session variable exists and sometimes it doesn't but the update is based on that variable.
I noticed that when the session variable doesn't exist, that another session variable named NEWorderID exists. I think we can solve the problem by setting the former session variable value to the latter in the case when it exists and the other doesn't. I've added that code to your pp_confirm page and cleared the log files.
If the issue occurs again that means this wasn't the cause, so let me know and I can look at the log files again to determine what else might be causing this problem.