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); }
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); }
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); }
public void SimpleCreditWithPaypal() { credit creditObj = new credit(); creditObj.amount = 106; creditObj.orderId = "123456"; creditObj.orderSource = orderSourceType.ecommerce; payPal payPalObj = new payPal(); payPalObj.payerId = "1234"; creditObj.paypal = payPalObj; creditResponse response = litle.Credit(creditObj); Assert.AreEqual("Approved", response.message); }