/// <summary> /// Checks the invoice identifier. /// </summary> /// <returns></returns> public static string CheckOrderId(List <string> orderIdsList) { string orderIds = RandomHelpers.GetUniqueOrderId(); if (orderIdsList != null) { againCheck: var check = orderIdsList.Contains(orderIds); if (check) { orderIds = RandomHelpers.GetUniqueOrderId(); goto againCheck; } else { return(orderIds); } } else { return(orderIds); } }