Skip to content

Instantly share code, notes, and snippets.

@VantivSDK
Created April 13, 2012 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VantivSDK/2377759 to your computer and use it in GitHub Desktop.
Save VantivSDK/2377759 to your computer and use it in GitHub Desktop.
.NET SDK - Litle AVS with Authorization Transaction
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Litle.Sdk;
//Address Verification System with Auth transaction
class Example
{
[STAThread]
public static void Main(String[] args)
{
LitleOnline litle = new LitleOnline();
authorization authorization = new authorization();
authorization.orderId = "1";
authorization.amount = 0;
authorization.orderSource = orderSourceType.ecommerce;
contact contact = new contact();
contact.name = "John Smith";
contact.addressLine1 = "1 Main St.";
contact.city = "Burlington";
contact.state = "MA";
contact.zip = "01803-3747";
contact.country = countryTypeEnum.US;
authorization.billToAddress = contact;
cardType card = new cardType();
card.type = methodOfPaymentTypeEnum.VI;
card.number = "4457010000000009";
card.expDate = "0112";
card.cardValidationNum = "349";
authorization.card = card;
authorizationResponse response = litle.Authorize(authorization);
//Display Results
Console.WriteLine("Response: " + response.response);
Console.WriteLine("Message: " + response.message);
Console.WriteLine("Litle Transaction Id: " + response.litleTxnId);
Console.WriteLine("AVS response: " + response.fraudResult.avsResult);
Console.ReadLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment