public static string GetPaymentMethodCheckouLabel(PaymentMethod value) { string label = null; Type type = value.GetType(); FieldInfo fi = type.GetField(value.ToString()); PaymentMethodCheckouLabelAttribute[] attrs = fi.GetCustomAttributes(typeof(PaymentMethodCheckouLabelAttribute), false) as PaymentMethodCheckouLabelAttribute[]; if (attrs.Length > 0) label = attrs[0].PaymentMethodCheckouLabelValue; return label; }