-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from Sushamaghadage123/US1662401
promoting changes for litle php sdk v8.32 and v8.33
- Loading branch information
Showing
20 changed files
with
856 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
|
||
namespace litle\sdk\Test\functional; | ||
|
||
use http\Message; | ||
use litle\sdk\LitleOnlineRequest; | ||
use litle\sdk\XmlParser; | ||
|
||
|
@@ -68,7 +69,7 @@ public function test_simple_auth_with_paypal() | |
|
||
public function test_simple_auth_with_litleTxnId() | ||
{ | ||
$hash_in = array('reportGroup' => 'planets', 'litleTxnId' => '1234567891234567891'); | ||
$hash_in = array('reportGroup' => 'planets', 'litleTxnId' => '1234567891234567891','amount' => '124','authIndicator'=>'Estimated'); | ||
|
||
$initilaize = new LitleOnlineRequest(); | ||
$authorizationResponse = $initilaize->authorizationRequest($hash_in); | ||
|
@@ -203,7 +204,7 @@ public function test_auth_with_applepay_approved() | |
'orderId' => '2111', | ||
'orderSource' => 'ecommerce', | ||
'id' => '654', | ||
'amount' => '12312'); | ||
'amount' => '1231'); | ||
|
||
$initilaize = new LitleOnlineRequest(); | ||
$authorizationResponse = $initilaize->authorizationRequest($hash_in); | ||
|
@@ -215,7 +216,7 @@ public function test_auth_with_processingType() | |
{ | ||
$hash_in = array( | ||
'card' => array('type' => 'VI', | ||
'number' => '4100200300011001', | ||
'number' => '4100200300011000', | ||
'expDate' => '0521',), | ||
'orderId' => '2111', | ||
'amount' => '4999', | ||
|
@@ -236,7 +237,7 @@ public function test_auth_with_originalNetworkTransactionId() | |
{ | ||
$hash_in = array( | ||
'card' => array('type' => 'VI', | ||
'number' => '4100200300011001', | ||
'number' => '4100200300011000', | ||
'expDate' => '0521', | ||
'cardValidationNum' => '463',), | ||
'orderId' => '2111', | ||
|
@@ -254,7 +255,7 @@ public function test_auth_with_originalTransactionAmount() | |
{ | ||
$hash_in = array( | ||
'card' => array('type' => 'VI', | ||
'number' => '4100200300011001', | ||
'number' => '4100200300011000', | ||
'expDate' => '0521', | ||
'cardValidationNum' => '463',), | ||
'orderId' => '2111', | ||
|
@@ -268,4 +269,106 @@ public function test_auth_with_originalTransactionAmount() | |
$response = XmlParser::getNode($authorizationResponse, 'response'); | ||
$this->assertEquals('000', $response); | ||
} | ||
public function test_auth_with_v8_32() | ||
{ | ||
$hash_in = array( | ||
'card' => array( | ||
'type' => 'VI', | ||
'number' => '4005518220000002', | ||
'expDate' => '0150', | ||
'cardValidationNum' => '987', | ||
), | ||
'id'=>'0001', | ||
'orderId' => '82364_cnpApiAuth', | ||
'amount' => '2870', | ||
'orderSource' => 'telephone', | ||
'billToAddress' => array( | ||
'name' => 'David Berman A', | ||
'addressLine1' => '10 Main Street', | ||
'city' => 'San Jose', | ||
'state' => 'ca', | ||
'zip' => '95032', | ||
'country' => 'USA', | ||
'email' => '[email protected]', | ||
'phone' => '781-270-1111', | ||
'sellerId' => '21234234A1', | ||
'url' => 'www.google.com', | ||
), | ||
'shipToAddress' => array( | ||
'name' => 'Raymond J. Johnson Jr. B', | ||
'addressLine1' => '123 Main Street', | ||
'city' => 'McLean', | ||
'state' => 'VA', | ||
'zip' => '22102', | ||
'country' => 'USA', | ||
'email' => '[email protected]', | ||
'phone' => '978-275-0000', | ||
'sellerId' => '21234234A2', | ||
'url' => 'www.google.com', | ||
), | ||
'retailerAddress' => array( | ||
'name' => 'John doe', | ||
'addressLine1' => '123 Main Street', | ||
'addressLine2' => '123 Main Street', | ||
'addressLine3' => '123 Main Street', | ||
'city' => 'Cincinnati', | ||
'state' => 'OH', | ||
'zip' => '45209', | ||
'country' => 'USA', | ||
'email' => '[email protected]', | ||
'phone' => '1234562783', | ||
'sellerId' => '21234234A12345678910', | ||
'companyName' => 'Google INC', | ||
'url' => 'https://www.youtube.com/results?search_query', | ||
), | ||
'additionalCOFData' => array( | ||
'totalPaymentCount' => 'ND', | ||
'paymentType' => 'Fixed Amount', | ||
'uniqueId' => '234GTYH654RF13', | ||
'frequencyOfMIT' => 'Annually', | ||
'validationReference' => 'ANBH789UHY564RFC@EDB', | ||
'sequenceIndicator' => '86', | ||
), | ||
'merchantCategoryCode' => '5964', | ||
'businessIndicator' => 'walletTransfer', | ||
'crypto' => 'true', | ||
); | ||
$initilaize = new LitleOnlineRequest(); | ||
$authorizationResponse = $initilaize->authorizationRequest($hash_in); | ||
$response = XmlParser::getNode($authorizationResponse, 'response'); | ||
$this->assertEquals('000', $response); | ||
} | ||
|
||
public function test_auth_with_changes_v8_33() | ||
{ | ||
$hash_in = array( | ||
'card' => array( | ||
'type' => 'VI', | ||
'number' => '4005518220000002', | ||
'expDate' => '0150', | ||
'cardValidationNum' => '987', | ||
), | ||
'id'=>'0001', | ||
'orderId' => '82364_cnpApiAuth', | ||
'amount' => '2870', | ||
'orderSource' => 'telephone', | ||
'additionalCOFData' => array( | ||
'totalPaymentCount' => 'ND', | ||
'paymentType' => 'Fixed Amount', | ||
'uniqueId' => '234GTYH654RF13', | ||
'frequencyOfMIT' => 'Annually', | ||
'validationReference' => 'ANBH789UHY564RFC@EDB', | ||
'sequenceIndicator' => '86', | ||
), | ||
'merchantCategoryCode' => '5964', | ||
'businessIndicator' => 'walletTransfer', | ||
'crypto' => 'true', | ||
'authIndicator' => 'Estimated' | ||
|
||
); | ||
$initilaize = new LitleOnlineRequest(); | ||
$authorizationResponse = $initilaize->authorizationRequest($hash_in); | ||
$response = XmlParser::getNode($authorizationResponse, 'response'); | ||
$this->assertEquals('000', $response); | ||
} | ||
} |
Oops, something went wrong.