Skip to content

Instantly share code, notes, and snippets.

View VantivSDK's full-sized avatar
🎯
Focusing

Worldpay from FIS - eCommerce VantivSDK

🎯
Focusing
View GitHub Profile
@VantivSDK
VantivSDK / gist:1941267
Created February 29, 2012 14:42
Ruby SDK - Litle Sale Transaction
require 'LitleOnline'
include LitleOnline
#Sale
my_sale_info = {
'orderId' => '1',
'amount' => '10010',
'orderSource'=>'ecommerce',
'billToAddress'=>{
'name' => 'John Smith',
@VantivSDK
VantivSDK / gist:1941291
Created February 29, 2012 14:46
Ruby SDK - Litle Payment full lifecycle example
require 'LitleOnline'
include LitleOnline
#Authorization
#Puts a hold on the funds
auth_hash = {
'orderId' => '1',
'amount' => '10010',
'orderSource'=>'ecommerce',
'billToAddress'=>{
@VantivSDK
VantivSDK / gist:1941298
Created February 29, 2012 14:47
Ruby SDK - Litle Authorization transaction
require 'LitleOnline'
include LitleOnline
#Authorization
auth_info = {
'orderId' => '1',
'amount' => '10010',
'orderSource'=>'ecommerce',
'billToAddress'=>{
'name' => 'John Smith',
@VantivSDK
VantivSDK / gist:1941575
Created February 29, 2012 15:25
Ruby SDK - Litle Capture Transaction
require 'LitleOnline'
include LitleOnline
#Capture
#litleTxnId contains the Litle Transaction Id returned on the authorization
capture_info = {'litleTxnId' => '100000000000000001'}
capture_response = LitleOnlineRequest.new.capture(capture_info)
#display results
puts "Response: " + capture_response.captureResponse.response
@VantivSDK
VantivSDK / gist:1941621
Created February 29, 2012 15:28
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)
@VantivSDK
VantivSDK / gist:1941662
Created February 29, 2012 15:31
Ruby SDK - Litle Partial Capture
require 'LitleOnline'
include LitleOnline
#Partial Capture
#litleTxnId contains the Litle Transaction Id returned as part of the authorization
#submit the amount to capture which is less than the authorization amount
#to generate a partial capture
capture_info = {'litleTxnId' => '320000000000000001', 'amount' => '5005'}
capture_response = LitleOnlineRequest.new.capture(capture_info)
@VantivSDK
VantivSDK / gist:1941694
Created February 29, 2012 15:33
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',
@VantivSDK
VantivSDK / gist:2007013
Created March 9, 2012 15:27
PHP SDK- Litle Credit Transaction
<?php
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
#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 = array(
'litleTxnId'=>'100000000000000002',
@VantivSDK
VantivSDK / gist:2007034
Created March 9, 2012 15:32
PHP SDK- Litle Partial Capture
<?php
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
#Partial Capture
#litleTxnId contains the Litle Transaction Id returned as part of the authorization
#submit the amount to capture which is less than the authorization amount
#to generate a partial capture
$capture_in = array(
'partial'=>'true',
@VantivSDK
VantivSDK / gist:2007077
Created March 9, 2012 15:38
PHP SDK- Litle Refund Transaction, stand-alone
<?php
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';
# standalone credit
$credit_info = array(
'id'=> '456',
'card'=>array('type'=>'VI',
'number'=>'4100000000000001',
'expDate'=>'1213',
'cardValidationNum' => '1213'),