public void Test28()
        {
            authorization authorization = new authorization();

            authorization.id          = "1";
            authorization.orderId     = "28";
            authorization.amount      = 15000;
            authorization.orderSource = orderSourceType.ecommerce;
            cardType card = new cardType();

            card.type                      = methodOfPaymentTypeEnum.MC;
            card.number                    = "5194560012341234";
            card.expDate                   = "1212";
            authorization.card             = card;
            authorization.allowPartialAuth = true;
            healthcareIIAS    healthcareiias    = new healthcareIIAS();
            healthcareAmounts healthcareamounts = new healthcareAmounts();

            healthcareamounts.totalHealthcareAmount = 15000;
            healthcareamounts.RxAmount       = 3698;
            healthcareiias.healthcareAmounts = healthcareamounts;
            healthcareiias.IIASFlag          = IIASFlagType.Y;
            authorization.healthcareIIAS     = healthcareiias;

            authorizationResponse response = cnp.Authorize(authorization);

            Assert.AreEqual("000", response.response);
            Assert.AreEqual("Approved", response.message);
        }
        public void Test29()
        {
            authorization authorization = new authorization();

            authorization.id          = "1";
            authorization.orderId     = "29";
            authorization.amount      = 18699;
            authorization.orderSource = orderSourceType.ecommerce;
            cardType card = new cardType();

            card.type                      = methodOfPaymentTypeEnum.VI;
            card.number                    = "4024720001231239";
            card.expDate                   = "1212";
            authorization.card             = card;
            authorization.allowPartialAuth = true;
            healthcareIIAS    healthcareiias    = new healthcareIIAS();
            healthcareAmounts healthcareamounts = new healthcareAmounts();

            healthcareamounts.totalHealthcareAmount = 31000;
            healthcareamounts.RxAmount          = 1000;
            healthcareamounts.visionAmount      = 19901;
            healthcareamounts.clinicOtherAmount = 9050;
            healthcareamounts.dentalAmount      = 1049;
            healthcareiias.healthcareAmounts    = healthcareamounts;
            healthcareiias.IIASFlag             = IIASFlagType.Y;
            authorization.healthcareIIAS        = healthcareiias;

            authorizationResponse response = cnp.Authorize(authorization);

            Assert.AreEqual("341", response.response);
        }
Beispiel #3
0
        public void test30()
        {
            var authorization = new authorization();

            authorization.orderId     = "30";
            authorization.amount      = 20000;
            authorization.orderSource = orderSourceType.ecommerce;
            var card = new cardType();

            card.type                      = methodOfPaymentTypeEnum.VI;
            card.number                    = "4024720001231239";
            card.expDate                   = "1212";
            authorization.card             = card;
            authorization.allowPartialAuth = true;
            var healthcareiias    = new healthcareIIAS();
            var healthcareamounts = new healthcareAmounts();

            healthcareamounts.totalHealthcareAmount = 20000;
            healthcareamounts.RxAmount          = 1000;
            healthcareamounts.visionAmount      = 19901;
            healthcareamounts.clinicOtherAmount = 9050;
            healthcareamounts.dentalAmount      = 1049;
            healthcareiias.healthcareAmounts    = healthcareamounts;
            healthcareiias.IIASFlag             = IIASFlagType.Y;
            authorization.healthcareIIAS        = healthcareiias;

            var response = litle.Authorize(authorization);

            Assert.AreEqual("341", response.response);
            Assert.AreEqual("Invalid healthcare amounts", response.message);
        }
Beispiel #4
0
        public void test31()
        {
            authorization authorization = new authorization();

            authorization.id          = "1";
            authorization.orderId     = "31";
            authorization.amount      = 25000;
            authorization.orderSource = orderSourceType.ecommerce;
            cardType card = new cardType();

            card.type                      = methodOfPaymentTypeEnum.VI;
            card.number                    = "4024720001231239";
            card.expDate                   = "1212";
            authorization.card             = card;
            authorization.allowPartialAuth = true;
            healthcareIIAS    healthcareiias    = new healthcareIIAS();
            healthcareAmounts healthcareamounts = new healthcareAmounts();

            healthcareamounts.totalHealthcareAmount = 18699;
            healthcareamounts.RxAmount       = 1000;
            healthcareamounts.visionAmount   = 15099;
            healthcareiias.healthcareAmounts = healthcareamounts;
            healthcareiias.IIASFlag          = IIASFlagType.Y;
            authorization.healthcareIIAS     = healthcareiias;

            authorizationResponse response = litle.Authorize(authorization);

            Assert.AreEqual("010", response.response);
            Assert.AreEqual("Partially Approved", response.message);
            Assert.AreEqual("18699", response.approvedAmount);
        }
Beispiel #5
0
        public void test27()
        {
            var authorization = new authorization();

            authorization.orderId     = "27";
            authorization.amount      = 18698;
            authorization.orderSource = orderSourceType.ecommerce;
            var card = new cardType();

            card.type                      = methodOfPaymentTypeEnum.MC;
            card.number                    = "5194560012341234";
            card.expDate                   = "1212";
            authorization.card             = card;
            authorization.allowPartialAuth = true;
            var healthcareiias    = new healthcareIIAS();
            var healthcareamounts = new healthcareAmounts();

            healthcareamounts.totalHealthcareAmount = 15000;
            healthcareamounts.RxAmount       = 16000;
            healthcareiias.healthcareAmounts = healthcareamounts;
            healthcareiias.IIASFlag          = IIASFlagType.Y;
            authorization.healthcareIIAS     = healthcareiias;

            var response = litle.Authorize(authorization);

            Assert.AreEqual("341", response.response);
            Assert.AreEqual("Invalid healthcare amounts", response.message);
        }
Beispiel #6
0
        public void Test26()
        {
            var authorization = new authorization();

            authorization.id          = "1";
            authorization.orderId     = "26";
            authorization.amount      = 18698;
            authorization.orderSource = orderSourceType.ecommerce;
            var card = new cardType();

            card.type                      = methodOfPaymentTypeEnum.MC;
            card.number                    = "5194560012341234";
            card.expDate                   = "1212";
            authorization.card             = card;
            authorization.allowPartialAuth = true;
            var healthcareiias    = new healthcareIIAS();
            var healthcareamounts = new healthcareAmounts();

            healthcareamounts.totalHealthcareAmount = 20000;
            healthcareiias.healthcareAmounts        = healthcareamounts;
            healthcareiias.IIASFlag      = IIASFlagType.Y;
            authorization.healthcareIIAS = healthcareiias;

            var response = this.SendTransaction <authorizationResponse>(authorization);

            Assert.AreEqual("341", response.response);
        }
        public void test31()
        {
            var authorization = new authorization();
            authorization.orderId = "31";
            authorization.amount = 25000;
            authorization.orderSource = orderSourceType.ecommerce;
            var card = new cardType();
            card.type = methodOfPaymentTypeEnum.VI;
            card.number = "4024720001231239";
            card.expDate = "1212";
            authorization.card = card;
            authorization.allowPartialAuth = true;
            var healthcareiias = new healthcareIIAS();
            var healthcareamounts = new healthcareAmounts();
            healthcareamounts.totalHealthcareAmount = 18699;
            healthcareamounts.RxAmount = 1000;
            healthcareamounts.visionAmount = 15099;
            healthcareiias.healthcareAmounts = healthcareamounts;
            healthcareiias.IIASFlag = IIASFlagType.Y;
            authorization.healthcareIIAS = healthcareiias;

            var response = litle.Authorize(authorization);
            Assert.AreEqual("010", response.response);
            Assert.AreEqual("Partially Approved", response.message);
            Assert.AreEqual("18699", response.approvedAmount);
        }
        public void test30()
        {
            var authorization = new authorization();
            authorization.orderId = "30";
            authorization.amount = 20000;
            authorization.orderSource = orderSourceType.ecommerce;
            var card = new cardType();
            card.type = methodOfPaymentTypeEnum.VI;
            card.number = "4024720001231239";
            card.expDate = "1212";
            authorization.card = card;
            authorization.allowPartialAuth = true;
            var healthcareiias = new healthcareIIAS();
            var healthcareamounts = new healthcareAmounts();
            healthcareamounts.totalHealthcareAmount = 20000;
            healthcareamounts.RxAmount = 1000;
            healthcareamounts.visionAmount = 19901;
            healthcareamounts.clinicOtherAmount = 9050;
            healthcareamounts.dentalAmount = 1049;
            healthcareiias.healthcareAmounts = healthcareamounts;
            healthcareiias.IIASFlag = IIASFlagType.Y;
            authorization.healthcareIIAS = healthcareiias;

            var response = litle.Authorize(authorization);
            Assert.AreEqual("341", response.response);
            Assert.AreEqual("Invalid healthcare amounts", response.message);
        }
        public void test28()
        {
            var authorization = new authorization();
            authorization.orderId = "28";
            authorization.amount = 15000;
            authorization.orderSource = orderSourceType.ecommerce;
            var card = new cardType();
            card.type = methodOfPaymentTypeEnum.MC;
            card.number = "5194560012341234";
            card.expDate = "1212";
            authorization.card = card;
            authorization.allowPartialAuth = true;
            var healthcareiias = new healthcareIIAS();
            var healthcareamounts = new healthcareAmounts();
            healthcareamounts.totalHealthcareAmount = 15000;
            healthcareamounts.RxAmount = 3698;
            healthcareiias.healthcareAmounts = healthcareamounts;
            healthcareiias.IIASFlag = IIASFlagType.Y;
            authorization.healthcareIIAS = healthcareiias;

            var response = litle.Authorize(authorization);
            Assert.AreEqual("000", response.response);
            Assert.AreEqual("Approved", response.message);
        }