public void posWithoutCapabilityAndEntryMode() { authorization authorization = new authorization(); authorization.reportGroup = "Planets"; authorization.orderId = "12344"; authorization.amount = 106; authorization.orderSource = orderSourceType.ecommerce; pos pos = new pos(); pos.cardholderId = posCardholderIdTypeEnum.pin; authorization.pos = pos; cardType card = new cardType(); card.type = methodOfPaymentTypeEnum.VI; card.number = "4100000000000002"; card.expDate = "1210"; authorization.card = card; //This needs to compile customBilling cb = new customBilling(); cb.phone = "1112223333"; //This needs to compile too try { litle.Authorize(authorization); //expected exception; } catch (LitleOnlineException e) { Assert.True(e.Message.StartsWith("Error validating xml data against the schema")); } }
public void trackData() { authorization authorization = new authorization(); authorization.id = "AX54321678"; authorization.reportGroup = "RG27"; authorization.orderId = "12z58743y1"; authorization.amount = 12522L; authorization.orderSource = orderSourceType.retail; contact billToAddress = new contact(); billToAddress.zip = "95032"; authorization.billToAddress = billToAddress; cardType card = new cardType(); card.track = "%B40000001^Doe/JohnP^06041...?;40001=0604101064200?"; authorization.card = card; pos pos = new pos(); pos.capability = posCapabilityTypeEnum.magstripe; pos.entryMode = posEntryModeTypeEnum.completeread; pos.cardholderId = posCardholderIdTypeEnum.signature; authorization.pos = pos; authorizationResponse response = litle.Authorize(authorization); Assert.AreEqual("Approved", response.message); }