Skip to content

Instantly share code, notes, and snippets.

@VantivSDK
Created February 29, 2012 15:28
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/1941621 to your computer and use it in GitHub Desktop.
Save VantivSDK/1941621 to your computer and use it in GitHub Desktop.
Ruby SDK - Litle Credit Transaction
require 'LitleOnline'
include LitleOnline
#Credit
#litleTxnId contains the Litle Transaction Id returned on
#the capture or sale transaction being credited
#the amount is optional, if it isn't submitted the full amount will be credited
credit_info = {'litleTxnId' => '100000000000000002', 'amount' => '1010'}
credit_response = LitleOnlineRequest.new.credit(credit_info)
#display results
puts "Response: " + credit_response.creditResponse.response
puts "Message: " + credit_response.creditResponse.message
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