示例#1
0
        static void Main(string[] args)
        {
            CreditCardService   creditCardService   = new CreditCardService();
            MoneyService        moneyService        = new MoneyService();
            BuisnessCardService buisnessCardService = new BuisnessCardService();

            creditCardService.GetCreditCard();
            moneyService.GetMoney();
            buisnessCardService.GetBuisnessCard();

            Console.ReadKey();
        }
示例#2
0
        public void TestMethodGetCreditCard()
        {
            ICreditCardService service = new CreditCardService();

            // Arrange
            var data = new Details
            {
                ExpirationMonth = 1,
                ExpirationYear  = 2020,
                CCV             = "901",
                Number          = "4000000000000001"
            };

            // Act
            var el = service.GetCreditCard(data.ExpirationMonth, data.ExpirationYear, data.Number, data.CCV);

            // Assert
            Assert.IsTrue(el.IsValid);
        }
示例#3
0
 public void GetCreditCardTest()
 {
     _cardService.AddCreditCard(_creditCard);
     Assert.AreEqual(_creditCard.CardNumber, _cardService.GetCreditCard(_creditCard.CardNumber).CardNumber);
 }
 //api/CreditCard/4
 public CreditCardViewModel GetCreditCard(int id)
 {
     return(_unitOfWork.GetCreditCard(id));
 }
示例#5
0
        private CreditCardViewModel SetCreditCardViewModel(CreditCardService service)
        {
            if (!_transientCardEntry)
             {
            var vm = service.GetCreditCard(int.Parse(PaymentSourceCombo.SelectedValue));
            vm.ReceiptEmailAddressCsv = EmailReceiptTextBox.Text.Trim();
            return vm;
             }

             var cardProfile = service.CreateNew();
             cardProfile.CreditCardNumber = m_txtCreditCardNumber.Text;
             cardProfile.CardVerificationCode = m_txtCreditCardSecurityCode.Text;
             cardProfile.ExpirationMonth = m_cboCreditCardExpireMonth.SelectedValue;
             cardProfile.ExpirationYear = m_cboCreditCardExpireYear.SelectedValue;
             cardProfile.ReceiptEmailAddressCsv = m_txtEmail.Text;
             cardProfile.CardType = m_cboCreditCardType.SelectedItem.Text;
             cardProfile.FirstName = m_txtFirstName.Text;
             cardProfile.LastName = m_txtLastName.Text;
             cardProfile.CompanyName = CompanyNameText.Text;
             return cardProfile;
        }
 protected string GetCardAlias()
 {
     var creditCardService = new CreditCardService(m_oIARequestEstimate.IARequest.MPUserID, MemberProtect, DataAccess, ApplicationContext.SiteProperites);
      var cardProfile = creditCardService.GetCreditCard(m_oIARequestEstimate.IARequest.IACustomerCreditCardID);
      return cardProfile != null ? cardProfile.Alias : string.Empty;
 }