One of the last code changes was to add oid to the querystring so in the redirect onthe checkout success page, I had you do this so I could see if the redirect was happening on the success page or not.
So now we know the redirect to the empty cart is happening because of this code on the success page:
<?php
if(!session_id()) session_start();
if (!isset($_SESSION['OrderID'])) {
$WA_Store_Cart->redirStr = "cart.php?oid=0";
}
?>
The redirect is occuring because $_SESSION['OrderID'] is not set, this is set by the Store Order Summary Behavior on the confirm page.
can you double check in the database to see if the order information is being stored.