Skip to content

Commit

Permalink
Merge pull request #45 from Vantiv/8.0-add_env_preliveStatus
Browse files Browse the repository at this point in the history
8.0 add env prelive status
  • Loading branch information
VantivSDK authored Nov 27, 2019
2 parents 2d1259f + 983f9c6 commit 561a711
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 0 deletions.
43 changes: 43 additions & 0 deletions litle/sdk/Test/certification/CertAlphaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,18 @@
// The voidRequest fails intermitently in many tests!!
class CertAlphaTest extends \PHPUnit_Framework_TestCase
{
private $preliveStatus;

function test_1_Auth()
{
$this->preliveStatus = $_SERVER['preliveStatus'];
if(strtolower($this->preliveStatus) == 'down'){
$this->markTestSkipped('Prelive is not available');
}

$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
#'user'=> '12312',
'orderId' => '1',
'amount' => '10100',
Expand Down Expand Up @@ -67,6 +75,7 @@ function test_1_Auth()
//test 1A
$capture_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -77,6 +86,7 @@ function test_1_Auth()
//test 1B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -99,6 +109,7 @@ function test_1_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '1',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -127,6 +138,7 @@ function test_1_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '1',
'amount' => '10010',
'orderSource' => 'ecommerce',
Expand All @@ -152,6 +164,7 @@ function test_1_sale()

$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -174,6 +187,7 @@ function test_2_Auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '2',
'amount' => '10100',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -203,6 +217,7 @@ function test_2_Auth()
//test 2A
$capture_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -213,6 +228,7 @@ function test_2_Auth()
//test 2B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -223,6 +239,7 @@ function test_2_Auth()
// Intermittent behavior
/*$void_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -235,6 +252,7 @@ function test_2_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '2',
'amount' => '10100',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -266,6 +284,7 @@ function test_2_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '2',
'amount' => '10100',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -295,6 +314,7 @@ function test_2_sale()
//test 2B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -305,6 +325,7 @@ function test_2_sale()
// Intermittent behavior
/*$void_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -317,6 +338,7 @@ function test_3_Auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '3',
'amount' => '10100',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -344,6 +366,7 @@ function test_3_Auth()
//test 3A
$capture_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -354,6 +377,7 @@ function test_3_Auth()
//test 3B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -364,6 +388,7 @@ function test_3_Auth()
// Intermittent behavior
/*$void_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -376,6 +401,7 @@ function test_3_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '3',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -404,6 +430,7 @@ function test_3_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '3',
'amount' => '30030',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -431,6 +458,7 @@ function test_3_sale()
//test 3B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -441,6 +469,7 @@ function test_3_sale()
// Intermittent behavior
/*$void_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -453,6 +482,7 @@ function test_4_Auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '4',
'amount' => '10100',
'orderSource' => 'ecommerce',
Expand All @@ -478,6 +508,7 @@ function test_4_Auth()
//test 4A
$capture_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -488,6 +519,7 @@ function test_4_Auth()
//test 4B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -510,6 +542,7 @@ function test_4_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '4',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -538,6 +571,7 @@ function test_4_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '4',
'amount' => '40040',
'orderSource' => 'ecommerce',
Expand All @@ -563,6 +597,7 @@ function test_4_sale()
//test 4B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -573,6 +608,7 @@ function test_4_sale()
// Intermittent behavior
/*$void_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -585,6 +621,7 @@ function test_5_auth()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '5',
'amount' => '50050',
'orderSource' => 'ecommerce',
Expand All @@ -606,6 +643,7 @@ function test_5_auth()
//test 5A
$capture_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -616,6 +654,7 @@ function test_5_auth()
//test 5B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($captureResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -638,6 +677,7 @@ function test_5_avs()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '5',
'amount' => '0',
'orderSource' => 'ecommerce',
Expand All @@ -661,6 +701,7 @@ function test_5_sale()
{
$sale_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '5',
'amount' => '50050',
'orderSource' => 'ecommerce',
Expand All @@ -682,6 +723,7 @@ function test_5_sale()
//test 5B
$credit_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($saleResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -692,6 +734,7 @@ function test_5_sale()
// Intermittent behavior
/*$void_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($creditResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand Down
11 changes: 11 additions & 0 deletions litle/sdk/Test/certification/CertAuthReversal.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function test_32()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '32',
'amount' => '10010',
'orderSource' => 'ecommerce',
Expand All @@ -63,6 +64,7 @@ public function test_32()
//test 32A
$capture_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -72,6 +74,7 @@ public function test_32()
//test32B
$authReversal_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets', 'amount' => '5005');
$initialize = new LitleOnlineRequest();
Expand All @@ -84,6 +87,7 @@ public function test_33()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '33',
'amount' => '20020',
'orderSource' => 'ecommerce',
Expand Down Expand Up @@ -112,6 +116,7 @@ public function test_33()
//test 33A
$authReversal_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -124,6 +129,7 @@ public function test_34()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '34',
'amount' => '30030',
'orderSource' => 'ecommerce',
Expand All @@ -150,6 +156,7 @@ public function test_34()
//test 34A
$authReversal_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets');
$initialize = new LitleOnlineRequest();
Expand All @@ -162,6 +169,7 @@ public function test_35()
{
$auth_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'orderId' => '35',
'amount' => '10100',
'orderSource' => 'ecommerce',
Expand All @@ -186,6 +194,7 @@ public function test_35()
//test 35A
$capture_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets', 'amount' => '5050');
$initialize = new LitleOnlineRequest();
Expand All @@ -195,6 +204,7 @@ public function test_35()
//test35B
$authReversal_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets', 'amount' => '5050');
$initialize = new LitleOnlineRequest();
Expand Down Expand Up @@ -222,6 +232,7 @@ public function test_36()
//test 33A
$authReversal_hash = array(
'url' => PRELIVE_URL,
'proxy' => '',
'litleTxnId' => (XmlParser::getNode($authorizationResponse, 'litleTxnId')),
'reportGroup' => 'planets', 'amount' => '10000');
$initialize = new LitleOnlineRequest();
Expand Down
Loading

0 comments on commit 561a711

Please sign in to comment.