コード例 #1
0
        public SubmittedPaymentSettingsForm Submit(PaymentSettingsData data)
        {
            //TODO: VladS. Clear button doesn't work
            //_clearButton.Click();

            _minAmountPerTransaction.Clear();
            _minAmountPerTransaction.SendKeys(data.MinAmountPerTransaction);
            //_minAmountPerTransaction.SendKeys(Keys.Enter);

            _maxAmountPerTransaction.Clear();
            _maxAmountPerTransaction.SendKeys(data.MaxAmountPerTransaction);
            //_maxAmountPerTransaction.SendKeys(Keys.Enter);

            _maxAmountPerDay.Clear();
            _maxAmountPerDay.SendKeys(data.MaxAmountPerDay);
            //_maxAmountPerDay.SendKeys(Keys.Enter);

            _maxTransactionPerDay.Clear();
            _maxTransactionPerDay.SendKeys(data.MaxTransactionsPerDay);
            //_maxTransactionPerDay.SendKeys(Keys.Enter);

            _maxTransactionPerWeek.Clear();
            _maxTransactionPerWeek.SendKeys(data.MaxTransactionsPerWeek);
            //_maxTransactionPerWeek.SendKeys(Keys.Enter);

            _maxTransactionPerMonth.Clear();
            _maxTransactionPerMonth.SendKeys(data.MaxTransactionsPerMonth);
            //_maxTransactionPerMonth.SendKeys(Keys.Enter);

            _driver.ScrollPage(0, 600);
            _saveButton.Click();
            var submittedForm = new SubmittedPaymentSettingsForm(_driver);

            return(submittedForm);
        }
コード例 #2
0
        public SubmittedPaymentSettingsForm Submit(PaymentSettingsData data)
        {
            SelectLicenseeBrand(By.XPath("//label[contains(@for, 'payment-settings-licensee')]"),
                                By.XPath("//select[contains(@id, 'payment-settings-licensee')]"), data.Licensee, By.XPath("//select[contains(@id, 'payment-settings-brand')]"), data.Brand);
            var currency = new SelectElement(_currencyField);

            currency.SelectByText(data.Currency);
            var paymentType = new SelectElement(_paymentTypeField);

            paymentType.SelectByText(data.PaymentType);
            if (data.VipLevel != null)
            {
                var vipLevel = new SelectElement(_vipLevel);
                vipLevel.SelectByText(data.VipLevel);
            }
            if (data.PaymentMethod != null)
            {
                var paymentMethod = new SelectElement(_paymentMethod);
                paymentMethod.SelectByText(data.PaymentMethod);
            }
            _minAmountPerTransaction.Clear();
            _minAmountPerTransaction.SendKeys(data.MinAmountPerTransaction);
            _maxAmountPerTransaction.Clear();
            _maxAmountPerTransaction.SendKeys(data.MaxAmountPerTransaction);
            _maxAmountPerDay.SendKeys(data.MaxAmountPerDay);
            _maxTransactionPerDay.SendKeys(data.MaxTransactionsPerDay);
            _maxTransactionPerWeek.SendKeys(data.MaxTransactionsPerWeek);
            _maxTransactionPerMonth.SendKeys(data.MaxTransactionsPerMonth);
            _driver.ScrollPage(0, 600);
            _saveButton.Click();
            var submittedForm = new SubmittedPaymentSettingsForm(_driver);

            return(submittedForm);
        }
コード例 #3
0
ファイル: paymentgateway.aspx.cs プロジェクト: jaytem/minGit
    protected void Process_EditOptions()
    {
        SiteAPI m_refSiteApi = new SiteAPI();
        PaymentSettingsData paymentOptions = new PaymentSettingsData();

        paymentOptions.PayPal = System.Convert.ToBoolean(chk_paypal.Checked);
        //paymentOptions.GoogleCheckout = chk_google.Checked

        m_refSiteApi.UpdatePaymentOptions(paymentOptions);

        Response.Redirect(this.m_sPageName + (m_iID > 0 ? "?action=view&id=" + this.m_iID : ""), false);
    }