Skip to content

Commit

Permalink
Added URL override so cert tests always use prelive.
Browse files Browse the repository at this point in the history
  • Loading branch information
DhruvSheth authored and Dhruv Sheth - Dev committed Mar 30, 2018
1 parent 5f1208c commit 8ed5d4f
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 2 deletions.
40 changes: 40 additions & 0 deletions litle/sdk/Test/certification/CertAlphaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class CertAlphaTest extends \PHPUnit_Framework_TestCase
function test_1_Auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
#'user'=> '12312',
'orderId' => '1',
'amount' => '10010',
Expand All @@ -64,6 +65,7 @@ function test_1_Auth()

//test 1A
$capture_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -73,6 +75,7 @@ function test_1_Auth()

//test 1B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -82,6 +85,7 @@ function test_1_Auth()

//test 1C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -93,6 +97,7 @@ function test_1_Auth()
function test_1_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '1',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -120,6 +125,7 @@ function test_1_avs()
function test_1_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'orderId' => '1',
'amount' => '10010',
'orderSource' => 'ecommerce',
Expand All @@ -144,6 +150,7 @@ function test_1_sale()
$this->assertEquals('M', XmlParser::getNode($saleResponse, 'cardValidationResult'));

$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -152,6 +159,7 @@ function test_1_sale()
$this->assertEquals('Approved', XmlParser::getNode($creditResponse, 'message'));

$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -163,6 +171,7 @@ function test_1_sale()
function test_2_Auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '2',
'amount' => '20020',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -191,6 +200,7 @@ function test_2_Auth()

//test 2A
$capture_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -200,6 +210,7 @@ function test_2_Auth()

//test 2B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -209,6 +220,7 @@ function test_2_Auth()

//test 2C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -220,6 +232,7 @@ function test_2_Auth()
function test_2_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '2',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -250,6 +263,7 @@ function test_2_avs()
function test_2_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'orderId' => '2',
'amount' => '20020',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -278,6 +292,7 @@ function test_2_sale()

//test 2B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -287,6 +302,7 @@ function test_2_sale()

//test 2C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -298,6 +314,7 @@ function test_2_sale()
function test_3_Auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '3',
'amount' => '30030',
'orderSource' => 'ecommerce',
Expand All @@ -324,6 +341,7 @@ function test_3_Auth()

//test 3A
$capture_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -333,6 +351,7 @@ function test_3_Auth()

//test 3B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -342,6 +361,7 @@ function test_3_Auth()

//test 3C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -353,6 +373,7 @@ function test_3_Auth()
function test_3_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '3',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -380,6 +401,7 @@ function test_3_avs()
function test_3_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'orderId' => '3',
'amount' => '30030',
'orderSource' => 'ecommerce',
Expand All @@ -406,6 +428,7 @@ function test_3_sale()

//test 3B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -415,6 +438,7 @@ function test_3_sale()

//test 3C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -426,6 +450,7 @@ function test_3_sale()
function test_4_Auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '4',
'amount' => '40040',
'orderSource' => 'ecommerce',
Expand All @@ -450,6 +475,7 @@ function test_4_Auth()

//test 4A
$capture_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -459,6 +485,7 @@ function test_4_Auth()

//test 4B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -468,6 +495,7 @@ function test_4_Auth()

//test 4C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -479,6 +507,7 @@ function test_4_Auth()
function test_4_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '4',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -506,6 +535,7 @@ function test_4_avs()
function test_4_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'orderId' => '4',
'amount' => '40040',
'orderSource' => 'ecommerce',
Expand All @@ -530,6 +560,7 @@ function test_4_sale()

//test 4B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -539,6 +570,7 @@ function test_4_sale()

//test 4C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -550,6 +582,7 @@ function test_4_sale()
function test_5_auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '5',
'amount' => '50050',
'orderSource' => 'ecommerce',
Expand All @@ -570,6 +603,7 @@ function test_5_auth()

//test 5A
$capture_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -579,6 +613,7 @@ function test_5_auth()

//test 5B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -588,6 +623,7 @@ function test_5_auth()

//test 5C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -599,6 +635,7 @@ function test_5_auth()
function test_5_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'orderId' => '5',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand All @@ -621,6 +658,7 @@ function test_5_avs()
function test_5_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'orderId' => '5',
'amount' => '50050',
'orderSource' => 'ecommerce',
Expand All @@ -641,6 +679,7 @@ function test_5_sale()

//test 5B
$credit_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand All @@ -650,6 +689,7 @@ function test_5_sale()

//test 5C
$void_hash = array(
'url' => PRELIVE_URL,
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initilaize = new LitleOnlineRequest();
Expand Down
Loading

0 comments on commit 8ed5d4f

Please sign in to comment.