Example #1
0
        private void LoadData()
        {
            PayLeapSettings settings = new PayLeapSettings();
            settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId));

            this.UsernameField.Text = settings.Username;

            if (settings.Password.Length > 0)
            {
                this.PasswordField.Text = "************";
            }
            //this.PasswordField.Text = settings.Password;

            this.chkTestMode.Checked = settings.TrainingMode;
            this.chkDebugMode.Checked = settings.DeveloperMode;
            this.chkEnableTracing.Checked = settings.EnableDebugTracing;
        }
Example #2
0
        private void SaveData()
        {
            PayLeapSettings settings = new PayLeapSettings();
            settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId));

            settings.Username = this.UsernameField.Text.Trim();
            if (this.PasswordField.Text != "************")
            {
                settings.Password = this.PasswordField.Text.Trim();
            }
            settings.TrainingMode = this.chkTestMode.Checked;
            settings.EnableDebugTracing = this.chkEnableTracing.Checked;
            settings.DeveloperMode = this.chkDebugMode.Checked;

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

            MyPage.MTApp.AccountServices.Stores.Update(MyPage.MTApp.CurrentStore);
        }