示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             PaymentMethod method = StorehouseHelper.GetPaymentMethod(PaymentMethod.PP_ACCOUNT);
             ecUtils.ToggleControls(method != null, btnDisable);
             //
             if (method != null)
             {
                 txtDisplayName.Text = method.DisplayName;
                 //
                 ctlPluginProps.Properties = StorehouseHelper.GetPluginProperties(method.PluginId);
             }
         }
         catch (Exception ex)
         {
             ShowErrorMessage("LOAD_PAYMENT_METHOD", ex);
         }
     }
 }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             //
             PaymentMethod method = StorehouseHelper.GetPaymentMethod(PaymentMethod.OFFLINE);
             //
             if (method != null)
             {
                 //
                 txtDisplayName.Text = method.DisplayName;
                 //
                 ctlPluginProps.Properties = StorehouseHelper.GetPluginProperties(SupportedPlugin.OFFLINE_PAYMENTS);
             }
         }
         catch (Exception ex)
         {
             ShowErrorMessage("LOAD_PAYMENT_METHOD", ex);
         }
     }
 }
        private void PaymentMethods_PreRender()
        {
            // CREDIT CARD
            PaymentMethod method_cc = StorehouseHelper.GetPaymentMethod(PaymentMethod.CREDIT_CARD);

            LinkCreditCard.Text += " " + ((method_cc == null) ? "(" + GetSharedLocalizedString(Keys.ModuleName, ITEM_DISABLED) + ")"
                                : "(" + GetSharedLocalizedString(Keys.ModuleName, ITEM_ENABLED) + ")");
            // 2CO
            PaymentMethod method_2co = StorehouseHelper.GetPaymentMethod(PaymentMethod.TCO);

            Link2Checkout.Text += " " + ((method_2co == null) ? "(" + GetSharedLocalizedString(Keys.ModuleName, ITEM_DISABLED) + ")"
                                : "(" + GetSharedLocalizedString(Keys.ModuleName, ITEM_ENABLED) + ")");
            // PAYPAL STANDARD
            PaymentMethod method_pp = StorehouseHelper.GetPaymentMethod(PaymentMethod.PP_ACCOUNT);

            LinkPayPalAccnt.Text += " " + ((method_pp == null) ? "(" + GetSharedLocalizedString(Keys.ModuleName, ITEM_DISABLED) + ")"
                                : "(" + GetSharedLocalizedString(Keys.ModuleName, ITEM_ENABLED) + ")");
            // OFFLINE
            PaymentMethod method_off = StorehouseHelper.GetPaymentMethod(PaymentMethod.OFFLINE);

            LinkOffline.Text += " " + ((method_off == null) ? "(" + GetSharedLocalizedString(Keys.ModuleName, ITEM_DISABLED) + ")"
                                : "(" + GetSharedLocalizedString(Keys.ModuleName, ITEM_ENABLED) + ")");
        }
示例#4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             //
             PaymentMethod method = StorehouseHelper.GetPaymentMethod(PaymentMethod.CREDIT_CARD);
             //
             EnsureCcProvsLoaded();
             //
             if (method != null)
             {
                 //
                 txtDisplayName.Text = method.DisplayName;
                 //
                 foreach (ListItem li in ddlAcceptPlugins.Items)
                 {
                     if (ExtractProvId(li.Value) == method.PluginId)
                     {
                         li.Selected = true;
                     }
                     else
                     {
                         li.Selected = false;
                     }
                 }
             }
         }
         catch (Exception ex)
         {
             ShowErrorMessage("LOAD_PAYMENT_METHOD", ex);
         }
     }
     //
     LoadProviderProperties(ddlAcceptPlugins.SelectedValue);
 }