Wow, sounds pretty challenging.
No way to do this using the session variable? I'm using cookie to store the session. I was wondering if it would be possible not to empty the cart upon leaving the site for the bank transfer. Then, back on the "thankyou -page", if the query string contains the right string telling that the transfer was successful (every bank has at least this feature) THEN I would send the order and empty the cart.
Wouldn't this be possible?