Skip to content

Instantly share code, notes, and snippets.

@VantivSDK
Created February 29, 2012 15:33
Show Gist options
  • Save VantivSDK/1941694 to your computer and use it in GitHub Desktop.
Save VantivSDK/1941694 to your computer and use it in GitHub Desktop.
Ruby SDK - Litle Refund Transaction, stand-alone
require 'LitleOnline'
include LitleOnline
#Stand alone credit
credit_info = {
'orderId' => '1',
'amount' => '1010',
'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'}
}
credit_response= LitleOnlineRequest.new.credit(credit_info)
#display results
puts "Response: " + credit_response.creditResponse.response
puts "Message: " + credit_response.creditResponse.response
puts "Litle Transaction ID: " + credit_response.creditResponse.litleTxnId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment