This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'LitleOnline' | |
include LitleOnline | |
#Sale | |
my_sale_info = { | |
'orderId' => '1', | |
'amount' => '10010', | |
'orderSource'=>'ecommerce', | |
'billToAddress'=>{ | |
'name' => 'John Smith', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'LitleOnline' | |
include LitleOnline | |
#Authorization | |
#Puts a hold on the funds | |
auth_hash = { | |
'orderId' => '1', | |
'amount' => '10010', | |
'orderSource'=>'ecommerce', | |
'billToAddress'=>{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'LitleOnline' | |
include LitleOnline | |
#Authorization | |
auth_info = { | |
'orderId' => '1', | |
'amount' => '10010', | |
'orderSource'=>'ecommerce', | |
'billToAddress'=>{ | |
'name' => 'John Smith', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'LitleOnline' | |
include LitleOnline | |
#Stand alone credit | |
credit_info = { | |
'orderId' => '1', | |
'amount' => '1010', | |
'orderSource'=>'ecommerce', | |
'billToAddress'=>{ | |
'name' => 'John Smith', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'), |
OlderNewer