Esempio n. 1
0
        private void LoadData()
        {
            PayFlowProSettings settings = new PayFlowProSettings();
            settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId));

            this.txtMerchantVendor.Text = settings.MerchantPartner;
            this.txtMerchantLogin.Text = settings.MerchantLogin;
            this.txtMerchantUser.Text = settings.MerchantUser;
            if (settings.MerchantPassword.Length > 0)
            {
                this.txtMerchantPassword.Text = "**********";
            }
            //this.txtMerchantPassword.Text = settings.MerchantPassword;
            this.chkTestMode.Checked = settings.TestMode;
            this.chkDebugMode.Checked = settings.DeveloperMode;
            this.CurrencyCodeDropDownList.SelectedValue = settings.CurrencyCode;
        }
Esempio n. 2
0
        private void SaveData()
        {
            PayFlowProSettings settings = new PayFlowProSettings();
            settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId));

            settings.MerchantPartner = this.txtMerchantVendor.Text.Trim();
            settings.MerchantLogin = this.txtMerchantLogin.Text.Trim();
            settings.MerchantUser = this.txtMerchantUser.Text.Trim();
            if (this.txtMerchantPassword.Text != "**********")
            {
                settings.MerchantPassword = this.txtMerchantPassword.Text.Trim();
            }
            settings.TestMode = this.chkTestMode.Checked;
            settings.DeveloperMode = this.chkDebugMode.Checked;
            settings.CurrencyCode = this.CurrencyCodeDropDownList.SelectedValue;

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

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