You're going to have to do some debugging. Start printing out the variables after the line that says $order = unserialize($_SESSION['swipehq_order_' . $order_id]);
and see where things are going awry.