Esempio n. 1
0
        private void LoadData()
        {
            StripeSettings settings = new StripeSettings();

            settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId));

            this.ApiKeyField.Text = settings.StripeApiKey;
        }
Esempio n. 2
0
        private void SaveData()
        {
            StripeSettings settings = new StripeSettings();

            settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId));

            settings.StripeApiKey = this.ApiKeyField.Text.Trim();

            MyPage.MTApp.CurrentStore.Settings.PaymentSettingsSet(this.BlockId, settings);

            MyPage.MTApp.AccountServices.Stores.Update(MyPage.MTApp.CurrentStore);
        }
Esempio n. 3
0
        public override void SaveData()
        {
            var settings = new StripeSettings();

            settings.Merge(HccApp.CurrentStore.Settings.PaymentSettingsGet(GatewayId));

            settings.StripeApiKey = txtApiKey.Text.Trim();
            settings.CurrencyCode = ddlCurrency.SelectedValue;

            HccApp.CurrentStore.Settings.PaymentSettingsSet(GatewayId, settings);

            HccApp.AccountServices.Stores.Update(HccApp.CurrentStore);
        }
Esempio n. 4
0
        public override void LoadData()
        {
            if (ddlCurrency.Items.Count == 0)
            {
                ddlCurrency.Items.Add(new ListItem(Localization.GetString("CurrencyEmptyValue"), string.Empty));
                ddlCurrency.AppendDataBoundItems = true;
                ddlCurrency.DataTextField        = "CurrencyEnglishName";
                ddlCurrency.DataValueField       = "ISOCurrencySymbol";
                ddlCurrency.DataSource           = Currency.GetCurrencyList();
                ddlCurrency.DataBind();
            }

            var settings = new StripeSettings();

            settings.Merge(HccApp.CurrentStore.Settings.PaymentSettingsGet(GatewayId));

            txtApiKey.Text            = settings.StripeApiKey;
            ddlCurrency.SelectedValue = settings.CurrencyCode;
        }