Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@VantivSDK
Created March 28, 2012 20:49
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/2230398 to your computer and use it in GitHub Desktop.
Save VantivSDK/2230398 to your computer and use it in GitHub Desktop.
Ruby SDK - Litle AVS transaction
require 'LitleOnline'
include LitleOnline
#AVS Only
auth_info = {
'orderId' => '1',
'amount' => '0',
'orderSource'=>'ecommerce',
'billToAddress'=>{
'name' => 'John Smith',
'addressLine1' => '1 Main St.',
'city' => 'Burlington',
'state' => 'MA',
'zip' => '01803-3747',
'country' => 'US'},
'card'=>{
'number' =>'4**************9',
'expDate' => '0112',
'cardValidationNum' => '349',
'type' => 'VI'}
}
auth_response = LitleOnlineRequest.new.authorization(auth_info)
#display results
puts "Response: " + auth_response.authorizationResponse.response
puts "Message: " + auth_response.authorizationResponse.message
puts "Litle Transaction ID: " + auth_response.authorizationResponse.litleTxnId
puts "AVS Match: " + auth_response.authorizationResponse.fraudResult.avsResult
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment