Skip to content

Instantly share code, notes, and snippets.

@gformich
Created January 29, 2012 03:05
Show Gist options
  • Save gformich/1696940 to your computer and use it in GitHub Desktop.
Save gformich/1696940 to your computer and use it in GitHub Desktop.
Quickstart sample sale transaction using the Litle SDK for Ruby
require 'LitleOnline'
# Visa $10 Sale
litleSaleTxn = {
'merchantId' => '087900',
'reportGroup'=>'rpt_grp',
'orderId'=>'1234567',
'card'=>{
'type'=>'VI',
'number' =>'4100000000000001',
'expDate' =>'1212'},
'orderSource'=>'ecommerce',
'amount'=>'1000'
}
# Peform the transaction on the Litle Platform
response = LitleOnlineRequest.sale(litleSaleTxn)
# display results
puts "Message: "+ response.message
puts "Litle Transaction ID: "+ response.creditResponse.litleTxnId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment