public PaymentRadioButtonList() { base.Items.Clear(); foreach (PaymentModeInfo info in SubsiteStoreHelper.GetPaymentModes()) { string str = info.Gateway.ToLower(); if ((info.IsUseInpour && !str.Equals("hishop.plugins.payment.advancerequest")) && (!str.Equals("hishop.plugins.payment.bankrequest") && !str.Equals("hishop.plugins.payment.codrequest"))) { if (str.Equals("hishop.plugins.payment.alipay_shortcut.shortcutrequest")) { HttpCookie cookie = HiContext.Current.Context.Request.Cookies["Token_" + HiContext.Current.User.UserId.ToString()]; if ((cookie != null) && !string.IsNullOrEmpty(cookie.Value)) { this.Items.Add(new ListItem(Globals.HtmlDecode(info.Name), info.ModeId.ToString(CultureInfo.InvariantCulture))); } } else { this.Items.Add(new ListItem(Globals.HtmlDecode(info.Name), info.ModeId.ToString(CultureInfo.InvariantCulture))); } } } this.SelectedIndex = 0; this.RepeatDirection = RepeatDirection.Horizontal; }
public PaymentRadioButtonList() { base.Items.Clear(); System.Collections.Generic.IList <PaymentModeInfo> paymentModes = SubsiteStoreHelper.GetPaymentModes(); foreach (PaymentModeInfo current in paymentModes) { string text = current.Gateway.ToLower(); if (current.IsUseInpour && !text.Equals("hishop.plugins.payment.advancerequest") && !text.Equals("hishop.plugins.payment.bankrequest") && !text.Equals("hishop.plugins.payment.codrequest")) { if (text.Equals("hishop.plugins.payment.alipay_shortcut.shortcutrequest")) { System.Web.HttpCookie httpCookie = Hidistro.Membership.Context.HiContext.Current.Context.Request.Cookies["Token_" + Hidistro.Membership.Context.HiContext.Current.User.UserId.ToString()]; if (httpCookie != null && !string.IsNullOrEmpty(httpCookie.Value)) { this.Items.Add(new System.Web.UI.WebControls.ListItem(Globals.HtmlDecode(current.Name), current.ModeId.ToString(System.Globalization.CultureInfo.InvariantCulture))); } } else { this.Items.Add(new System.Web.UI.WebControls.ListItem(Globals.HtmlDecode(current.Name), current.ModeId.ToString(System.Globalization.CultureInfo.InvariantCulture))); } } } this.SelectedIndex = 0; this.RepeatDirection = System.Web.UI.WebControls.RepeatDirection.Horizontal; }