Пример #1
0
        public void PostNonCreditIntegrationTest()
        {
            Konduto konduto = new Konduto("T738D516F09CAB3A2C1EE");

            KondutoCustomer Customer = new KondutoCustomer
            {
                Id    = "28372",
                Name  = "KdtUser",
                Email = "*****@*****.**"
            };

            KondutoOrder order = new KondutoOrder
            {
                Id          = ((Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds).ToString(),
                Visitor     = "38a9412f0b01b4dd1762ae424169a3e490d75c7a",
                TotalAmount = 100.00,
                Customer    = Customer,
                Payments    = KondutoPaymentFactory.CreateNonCreditPayments(),
                Analyze     = true
            };

            try
            {
                konduto.Analyze(order);
                Assert.IsTrue(order.Recommendation != KondutoRecommendation.none);
            }
            catch (KondutoException ex)
            {
                Assert.Fail("Konduto exception shouldn't happen here.");
            }
        }