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

            this.UsernameField.Text = settings.MerchantLoginId;
            this.PasswordField.Text = settings.TransactionKey;
            this.chkTestMode.Checked = settings.TestMode;
            this.chkDebugMode.Checked = settings.DeveloperMode;
            this.EmailCustomerCheckBox.Checked = settings.SendEmailToCustomer;
        }
Ejemplo n.º 2
0
        private void SaveData()
        {
            AuthorizeNetSettings settings = new AuthorizeNetSettings();
            settings.Merge(MyPage.MTApp.CurrentStore.Settings.PaymentSettingsGet(this.BlockId));

            settings.MerchantLoginId = this.UsernameField.Text.Trim();
            settings.TransactionKey = this.PasswordField.Text.Trim();
            settings.TestMode = this.chkTestMode.Checked;
            settings.SendEmailToCustomer = this.EmailCustomerCheckBox.Checked;
            settings.DeveloperMode = this.chkDebugMode.Checked;

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

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