public static void PaymentConfirmed() { List <ProcessingOrder> processingOrders; if (UserSingleton.GetInstance.IsAuthenticated) { processingOrders = UserSingleton.GetInstance.ProcessingOrders; List <PastOrder> pastOrders = PastOrderFactory.CreateSeveral(processingOrders, UserSingleton.GetInstance.User); pastOrders.ForEach(p => p.RecordInDb()); UserSingleton.GetInstance.PastOrders.AddRange(pastOrders); UserSingleton.GetInstance.ProcessingOrders.Clear(); } UserSingleton.VisitorProcessingOrders.Clear(); }