Exemple #1
0
        public void CreateCheckTest()
        {
            var r = GetRandom.Object <CheckDbRecord>();
            var o = PaymentObjectFactory.CreateCheck(r.ID, r.Amount, r.Currency, r.Memo, r.Payer,
                                                     r.PayerAccountNumber, r.Payee, r.PayeeAccountNumber, r.CheckNumber, r.ValidFrom, r.ValidTo);

            Assert.IsInstanceOfType(o, typeof(CheckObject));
            testVariables(o.DbRecord, r.ID, r.Amount, r.Currency, r.Memo, r.Payer, r.Payee, r.ValidFrom,
                          r.ValidTo, r.PayeeAccountNumber, r.PayerAccountNumber);
        }
Exemple #2
0
        CreateCheck([Bind(checkProperties)] CheckViewModel c)
        {
            if (!ModelState.IsValid)
            {
                return(View(c));
            }
            c.ID = Guid.NewGuid().ToString();
            var o = PaymentObjectFactory.CreateCheck(c.ID, c.Amount, c.Currency, c.Memo, c.Payer, c.PayerAccountNumber,
                                                     c.Payee, c.PayeeAccountNumber, c.CheckNumber, c.ValidFrom, c.ValidTo);
            await payments.AddObject(o);

            return(RedirectToAction("Index"));
        }