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 PayPalPaymentsProSettings(); settings.Merge(HccApp.CurrentStore.Settings.PaymentSettingsGet(GatewayId)); txtUsername.Text = settings.PayPalUserName; if (settings.PayPalPassword.Length > 0) { txtPassword.Text = "**********"; } ddlCurrency.SelectedValue = settings.Currency; txtSignature.Text = settings.PayPalSignature; rblMode.SelectedValue = settings.PayPalMode; chkDebugMode.Checked = settings.DebugMode; }
private void LoadData() { PayPalPaymentsProSettings settings = new PayPalPaymentsProSettings(); settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId)); this.UsernameTextBox.Text = settings.PayPalUserName; if (settings.PayPalPassword.Length > 0) { this.PasswordTextBox.Text = "**********"; } //this.PasswordTextBox.Text = settings.PayPalPassword; this.SignatureTextBox.Text = settings.PayPalSignature; this.ModeRadioButtonList.SelectedValue = settings.PayPalMode; this.chkDebugMode.Checked = settings.DebugMode; //this.UsernameTextBox.Text = MyPage.CurrentStore.PaypalUserName; //this.PasswordTextBox.Text = MyPage.CurrentStore.PaypalPassword; //this.SignatureTextBox.Text = MyPage.CurrentStore.PaypalSignature; //this.ModeRadioButtonList.SelectedValue = MyPage.CurrentStore.PaypalMode; }
public override void SaveData() { var settings = new PayPalPaymentsProSettings(); settings.Merge(HccApp.CurrentStore.Settings.PaymentSettingsGet(GatewayId)); settings.PayPalUserName = txtUsername.Text.Trim(); if (txtPassword.Text != "**********") { settings.PayPalPassword = txtPassword.Text.Trim(); } settings.PayPalSignature = txtSignature.Text.Trim(); settings.Currency = ddlCurrency.SelectedValue; settings.PayPalMode = rblMode.SelectedValue; settings.DebugMode = chkDebugMode.Checked; HccApp.CurrentStore.Settings.PaymentSettingsSet(GatewayId, settings); HccApp.AccountServices.Stores.Update(HccApp.CurrentStore); }
private void SaveData() { PayPalPaymentsProSettings settings = new PayPalPaymentsProSettings(); settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId)); settings.PayPalUserName = this.UsernameTextBox.Text; if (this.PasswordTextBox.Text != "**********") { settings.PayPalPassword = this.PasswordTextBox.Text; } settings.PayPalSignature = this.SignatureTextBox.Text; settings.PayPalMode = this.ModeRadioButtonList.SelectedValue; //MyPage.Services.CurrentStore.PaypalUserName = this.UsernameTextBox.Text; //MyPage.Services.CurrentStore.PaypalPassword = this.PasswordTextBox.Text; //MyPage.Services.CurrentStore.PaypalSignature = this.SignatureTextBox.Text; //MyPage.Services.CurrentStore.PaypalMode = this.ModeRadioButtonList.SelectedValue; settings.DebugMode = this.chkDebugMode.Checked; MyPage.MTApp.CurrentStore.Settings.PaymentSettingsSet(this.BlockId, settings); MyPage.MTApp.AccountServices.Stores.Update(MyPage.MTApp.CurrentStore); }