Exemplo n.º 1
0
        public void SimpleCreditWithPaypal()
        {
            var creditObj = new credit();

            creditObj.amount      = 106;
            creditObj.orderId     = "123456";
            creditObj.orderSource = orderSourceType.ecommerce;
            var payPalObj = new payPal();

            payPalObj.payerId = "1234";

            creditObj.paypal = payPalObj;

            var response = litle.Credit(creditObj);

            Assert.AreEqual("Approved", response.message);
        }
Exemplo n.º 2
0
        public void SimpleSaleWithPayPal()
        {
            sale saleObj = new sale();

            saleObj.amount      = 106;
            saleObj.litleTxnId  = 123456;
            saleObj.orderId     = "12344";
            saleObj.orderSource = orderSourceType.ecommerce;
            payPal payPalObj = new payPal();

            payPalObj.payerId       = "1234";
            payPalObj.token         = "1234";
            payPalObj.transactionId = "123456";
            saleObj.paypal          = payPalObj;
            saleResponse responseObj = litle.Sale(saleObj);

            StringAssert.AreEqualIgnoringCase("Approved", responseObj.message);
        }
Exemplo n.º 3
0
        public void testAuthHandleSpecialCharacters()
        {
            authorization authorization = new authorization();

            authorization.reportGroup = "<'&\">";
            authorization.orderId     = "123456";
            authorization.amount      = 106;
            authorization.orderSource = orderSourceType.ecommerce;
            payPal paypal = new payPal();

            paypal.payerId       = "1234";
            paypal.token         = "1234";
            paypal.transactionId = "123456";
            authorization.paypal = paypal; //This needs to compile

            customBilling cb = new customBilling();

            cb.phone = "<'&\">"; //This needs to compile too

            authorizationResponse response = litle.Authorize(authorization);

            Assert.AreEqual("Approved", response.message);
        }
Exemplo n.º 4
0
        public void simpleAuthWithPaypal()
        {
            authorization authorization = new authorization();

            authorization.reportGroup = "Planets";
            authorization.orderId     = "123456";
            authorization.amount      = 106;
            authorization.orderSource = orderSourceType.ecommerce;
            payPal paypal = new payPal();

            paypal.payerId       = "1234";
            paypal.token         = "1234";
            paypal.transactionId = "123456";
            authorization.paypal = paypal; //This needs to compile

            customBilling cb = new customBilling();

            cb.phone = "1112223333"; //This needs to compile too

            authorizationResponse response = litle.Authorize(authorization);

            Assert.AreEqual("Approved", response.message);
        }
Exemplo n.º 5
0
        public void SimpleCreditWithPaypal()
        {
            var creditObj = new credit();
            creditObj.amount = 106;
            creditObj.orderId = "123456";
            creditObj.orderSource = orderSourceType.ecommerce;
            var payPalObj = new payPal();
            payPalObj.payerId = "1234";

            creditObj.paypal = payPalObj;

            var response = litle.Credit(creditObj);
            Assert.AreEqual("Approved", response.message);
        }
Exemplo n.º 6
0
        public void testAuthHandleSpecialCharacters()
        {
            var authorization = new authorization();
            authorization.reportGroup = "<'&\">";
            authorization.orderId = "123456";
            authorization.amount = 106;
            authorization.orderSource = orderSourceType.ecommerce;
            var paypal = new payPal();
            paypal.payerId = "1234";
            paypal.token = "1234";
            paypal.transactionId = "123456";
            authorization.paypal = paypal; //This needs to compile

            var cb = new customBilling();
            cb.phone = "<'&\">"; //This needs to compile too

            var response = litle.Authorize(authorization);
            Assert.AreEqual("Approved", response.message);
        }
Exemplo n.º 7
0
        public void simpleAuthWithPaypal()
        {
            var authorization = new authorization();
            authorization.reportGroup = "Planets";
            authorization.orderId = "123456";
            authorization.amount = 106;
            authorization.orderSource = orderSourceType.ecommerce;
            var paypal = new payPal();
            paypal.payerId = "1234";
            paypal.token = "1234";
            paypal.transactionId = "123456";
            authorization.paypal = paypal; //This needs to compile

            var cb = new customBilling();
            cb.phone = "1112223333"; //This needs to compile too

            var response = litle.Authorize(authorization);
            Assert.AreEqual("Approved", response.message);
        }
Exemplo n.º 8
0
 public void SimpleSaleWithPayPal()
 {
     var saleObj = new sale();
     saleObj.amount = 106;
     saleObj.litleTxnId = 123456;
     saleObj.orderId = "12344";
     saleObj.orderSource = orderSourceType.ecommerce;
     var payPalObj = new payPal();
     payPalObj.payerId = "1234";
     payPalObj.token = "1234";
     payPalObj.transactionId = "123456";
     saleObj.paypal = payPalObj;
     var responseObj = litle.Sale(saleObj);
     StringAssert.AreEqualIgnoringCase("Approved", responseObj.message);
 }