Skip to content

Commit

Permalink
cert test final fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Nunez - Developer committed Apr 9, 2018
1 parent 595b431 commit df757d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
21 changes: 3 additions & 18 deletions litle/sdk/Test/certification/CertAlphaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function test_1_Auth()
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
$this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($authorizationResponse, 'message'));
//TODO: getting blank auth code
$this->assertEquals('11111', trim(XmlParser::getNode($authorizationResponse, 'authCode')));
$this->assertEquals('1', XmlParser::getNode($authorizationResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($authorizationResponse, 'cardValidationResult'));
Expand Down Expand Up @@ -119,7 +118,6 @@ function test_1_avs()
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
$this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($authorizationResponse, 'message'));
//TODO: Getting blank authCode
$this->assertEquals('11111', trim(XmlParser::getNode($authorizationResponse, 'authCode')));
$this->assertEquals('1', XmlParser::getNode($authorizationResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($authorizationResponse, 'cardValidationResult'));
Expand Down Expand Up @@ -149,7 +147,6 @@ function test_1_sale()
$saleResponse = $initialize->saleRequest($sale_hash);
$this->assertEquals('000', XmlParser::getNode($saleResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($saleResponse, 'message'));
//TODO: Getting 05890 as authcode
$this->assertEquals('11111', trim(XmlParser::getNode($saleResponse, 'authCode')));
$this->assertEquals('1', XmlParser::getNode($saleResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($saleResponse, 'cardValidationResult'));
Expand Down Expand Up @@ -194,15 +191,13 @@ function test_2_Auth()
'expDate' => '0212',
'cardValidationNum' => '261',
'type' => 'MC'),
//TODO 3-D Secure transaction not supported by merchant
'cardholderAuthentication' => array('authenticationValue'=>'BwABBJQ1AgAAAAAgJDUCAAAAAAA=' )
);

$initialize = new LitleOnlineRequest();
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
$this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($authorizationResponse, 'message'));
//TODO: getting empty authcode
$this->assertEquals('22222', trim(XmlParser::getNode($authorizationResponse, 'authCode')));
$this->assertEquals('10', XmlParser::getNode($authorizationResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($authorizationResponse, 'cardValidationResult'));
Expand Down Expand Up @@ -262,18 +257,16 @@ function test_2_avs()
'expDate' => '0212',
'cardValidationNum' => '261',
'type' => 'MC'),
//TODO run against prelive for certification
'cardholderAuthentication' => array('authenticationValue'=>'BwABBJQ1AgAAAAAgJDUCAAAAAAA=' )
);

$initialize = new LitleOnlineRequest();
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
$this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($authorizationResponse, 'message'));
//TODO: Getting blank authcode
//$this->assertEquals('22222', trim(XmlParser::getNode($authorizationResponse, 'authCode')));
//$this->assertEquals('10', XmlParser::getNode($authorizationResponse, 'avsResult'));
//$this->assertEquals('M', XmlParser::getNode($authorizationResponse, 'cardValidationResult'));
$this->assertEquals('22222', trim(XmlParser::getNode($authorizationResponse, 'authCode')));
$this->assertEquals('10', XmlParser::getNode($authorizationResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($authorizationResponse, 'cardValidationResult'));
}

function test_2_sale()
Expand Down Expand Up @@ -303,7 +296,6 @@ function test_2_sale()
$saleResponse = $initialize->saleRequest($sale_hash);
$this->assertEquals('000', XmlParser::getNode($saleResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($saleResponse, 'message'));
//TODO: getting 03180 as authcode
$this->assertEquals('22222', trim(XmlParser::getNode($saleResponse, 'authCode')));
$this->assertEquals('10', XmlParser::getNode($saleResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($saleResponse, 'cardValidationResult'));
Expand Down Expand Up @@ -355,7 +347,6 @@ function test_3_Auth()
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
$this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($authorizationResponse, 'message'));
//TODO: getting blank auth code
$this->assertEquals('33333', trim(XmlParser::getNode($authorizationResponse, 'authCode')));
$this->assertEquals('10', XmlParser::getNode($authorizationResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($authorizationResponse, 'cardValidationResult'));
Expand Down Expand Up @@ -418,7 +409,6 @@ function test_3_avs()
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
$this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($authorizationResponse, 'message'));
//Getting blank auth code
$this->assertEquals('33333', trim(XmlParser::getNode($authorizationResponse, 'authCode')));
$this->assertEquals('10', XmlParser::getNode($authorizationResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($authorizationResponse, 'cardValidationResult'));
Expand Down Expand Up @@ -449,7 +439,6 @@ function test_3_sale()
$saleResponse = $initialize->saleRequest($sale_hash);
$this->assertEquals('000', XmlParser::getNode($saleResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($saleResponse, 'message'));
//TODO: getting 57966 as authcode
$this->assertEquals('33333', trim(XmlParser::getNode($saleResponse, 'authCode')));
$this->assertEquals('10', XmlParser::getNode($saleResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($saleResponse, 'cardValidationResult'));
Expand Down Expand Up @@ -499,7 +488,6 @@ function test_4_Auth()

$initialize = new LitleOnlineRequest();
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
//TODO run against prelive for certification
$this->assertEquals('000',XmlParser::getNode($authorizationResponse,'response'));
$this->assertEquals('Approved',XmlParser::getNode($authorizationResponse,'message'));
$this->assertEquals('44444 ',XmlParser::getNode($authorizationResponse,'authCode'));
Expand Down Expand Up @@ -561,7 +549,6 @@ function test_4_avs()

$initialize = new LitleOnlineRequest();
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
//TODO run against prelive for certification
$this->assertEquals('000',XmlParser::getNode($authorizationResponse,'response'));
$this->assertEquals('Approved',XmlParser::getNode($authorizationResponse,'message'));
$this->assertEquals('44444 ',XmlParser::getNode($authorizationResponse,'authCode'));
Expand Down Expand Up @@ -697,7 +684,6 @@ function test_5_avs()
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
$this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($authorizationResponse, 'message'));
//TODO: getting blank authcode
$this->assertEquals('55555 ', XmlParser::getNode($authorizationResponse, 'authCode'));
$this->assertEquals('32', XmlParser::getNode($authorizationResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($authorizationResponse, 'cardValidationResult'));
Expand All @@ -723,7 +709,6 @@ function test_5_sale()
$saleResponse = $initialize->saleRequest($sale_hash);
$this->assertEquals('000', XmlParser::getNode($saleResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($saleResponse, 'message'));
//TODO: getting 59302 as authcode
$this->assertEquals('55555 ', XmlParser::getNode($saleResponse, 'authCode'));
$this->assertEquals('32', XmlParser::getNode($saleResponse, 'avsResult'));
$this->assertEquals('M', XmlParser::getNode($saleResponse, 'cardValidationResult'));
Expand Down
1 change: 0 additions & 1 deletion litle/sdk/Test/certification/CertAuthReversal.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ public function test_36()
'type' => 'AX'));
$initialize = new LitleOnlineRequest();
$authorizationResponse = $initialize->authorizationRequest($auth_hash);
//TODO Processing Network Unavailable
$this->assertEquals('000', XmlParser::getNode($authorizationResponse, 'response'));
$this->assertEquals('Approved', XmlParser::getNode($authorizationResponse, 'message'));

Expand Down

0 comments on commit df757d7

Please sign in to comment.