Skip to content

Commit 658c012

Browse files
committed
Adding new Mock files.
1 parent 0db2ff0 commit 658c012

9 files changed

+25
-29
lines changed

src/Message/SecureXMLAbstractRequest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ public function getMessageId()
7373
return $this->getParameter('messageId');
7474
}
7575

76-
/**
77-
* @param $data
78-
* @return mixed
79-
*/
8076
public function sendData($data)
8177
{
8278
$httpResponse = $this->httpClient->request('POST', $this->getEndpoint(), [], $data->asXML());

tests/Message/SecureXMLAuthorizeRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testSendSuccess()
4545
$this->assertNotNull($response->getTransactionId());
4646
$this->assertSame('Approved', $response->getMessage());
4747
$this->assertSame('00', $response->getCode());
48-
$this->assertSame('0', (string) $data->Payment->TxnList->Txn->txnType);
48+
$this->assertSame('10', (string) $data->Payment->TxnList->Txn->txnType);
4949
}
5050

5151
public function testSendFailure()

tests/Mock/SecureXMLAuthorizeRequestFail.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
HTTP/1.1 100 Continue
2-
Server: Microsoft-IIS/5.0
3-
Date: Mon, 19 Apr 2004 06:19:48 GMT
2+
Server: Apache/2.4.29 (Ubuntu)
3+
Date: Sat, 26 May 2018 07:25:31 GMT
44
HTTP/1.1 200 OK
5-
Server: Microsoft-IIS/5.0
6-
Date: Mon, 19 Apr 2004 06:20:01 GMT
5+
Server: Apache/2.4.29 (Ubuntu)
6+
Date: Sat, 26 May 2018 07:25:31 GMT
77
Content-Type: text/xml;charset=ISO-8859-1
88
Content-Length: 929
99

@@ -22,4 +22,4 @@ Content-Length: 929
2222
<statusCode>510</statusCode>
2323
<statusDescription>Unable To Connect To Server</statusDescription>
2424
</Status>
25-
</NABTransactMessage>
25+
</NABTransactMessage>

tests/Mock/SecureXMLAuthorizeRequestInsufficientFundsFail.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
HTTP/1.1 100 Continue
2-
Server: Microsoft-IIS/5.0
3-
Date: Mon, 19 Apr 2004 06:19:48 GMT
2+
Server: Apache/2.4.29 (Ubuntu)
3+
Date: Sat, 26 May 2018 07:25:31 GMT
44
HTTP/1.1 200 OK
5-
Server: Microsoft-IIS/5.0
6-
Date: Mon, 19 Apr 2004 06:20:01 GMT
5+
Server: Apache/2.4.29 (Ubuntu)
6+
Date: Sat, 26 May 2018 07:25:31 GMT
77
Content-Type: text/xml;charset=ISO-8859-1
88
Content-Length: 929
99

tests/Mock/SecureXMLAuthorizeRequestInvalidMerchantFail.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
HTTP/1.1 100 Continue
2-
Server: Microsoft-IIS/5.0
3-
Date: Mon, 19 Apr 2004 06:19:48 GMT
2+
Server: Apache/2.4.29 (Ubuntu)
3+
Date: Sat, 26 May 2018 07:25:31 GMT
44
HTTP/1.1 200 OK
5-
Server: Microsoft-IIS/5.0
6-
Date: Mon, 19 Apr 2004 06:20:01 GMT
5+
Server: Apache/2.4.29 (Ubuntu)
6+
Date: Sat, 26 May 2018 07:25:31 GMT
77
Content-Type: text/xml;charset=ISO-8859-1
88
Content-Length: 929
99

tests/Mock/SecureXMLAuthorizeRequestInvalidMerchantIDFail.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
HTTP/1.1 100 Continue
2-
Server: Microsoft-IIS/5.0
3-
Date: Mon, 19 Apr 2004 06:19:48 GMT
2+
Server: Apache/2.4.29 (Ubuntu)
3+
Date: Sat, 26 May 2018 07:25:31 GMT
44
HTTP/1.1 200 OK
5-
Server: Microsoft-IIS/5.0
6-
Date: Mon, 19 Apr 2004 06:20:01 GMT
5+
Server: Apache/2.4.29 (Ubuntu)
6+
Date: Sat, 26 May 2018 07:25:31 GMT
77
Content-Type: text/xml;charset=ISO-8859-1
88
Content-Length: 929
99

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
HTTP/1.1 100 Continue
2-
Server: Microsoft-IIS/5.0
2+
Server: Apache/2.4.29 (Ubuntu)
33
Date: Sat, 26 May 2018 07:25:31 GMT
44
HTTP/1.1 200 OK
5-
Server: Microsoft-IIS/5.0
5+
Server: Apache/2.4.29 (Ubuntu)
66
Date: Sat, 26 May 2018 07:25:31 GMT
77
Content-Type: text/xml;charset=ISO-8859-1
88
Content-Length: 929
99

10-
<?xml version="1.0" encoding="UTF-8" standalone="no"?><NABTransactMessage><MessageInfo><messageID>a246d3d2ff1a75298ebe54f21fe887</messageID><messageTimestamp>20182605172441033000+600</messageTimestamp><apiVersion>xml-4.2</apiVersion></MessageInfo><RequestType>Payment</RequestType><MerchantInfo><merchantID>XYZ0010</merchantID></MerchantInfo><Status><statusCode>000</statusCode><statusDescription>Normal</statusDescription></Status><Payment><TxnList count="1"><Txn ID="1"><txnType>0</txnType><txnSource>23</txnSource><amount>1200</amount><currency>AUD</currency><purchaseOrderNo>ORDER-ZYX8789</purchaseOrderNo><approved>Yes</approved><responseCode>00</responseCode><responseText>Approved</responseText><settlementDate>20180526</settlementDate><txnID>800055</txnID><authID>711736</authID><CreditCardInfo><pan>444433...111</pan><expiryDate>12/18</expiryDate><cardType>6</cardType><cardDescription>Visa</cardDescription></CreditCardInfo></Txn></TxnList></Payment></NABTransactMessage>
10+
<?xml version="1.0" encoding="UTF-8" standalone="no"?><NABTransactMessage><MessageInfo><messageID>a246d3d2ff1a75298ebe54f21fe887</messageID><messageTimestamp>20182605172441033000+600</messageTimestamp><apiVersion>xml-4.2</apiVersion></MessageInfo><RequestType>Payment</RequestType><MerchantInfo><merchantID>XYZ0010</merchantID></MerchantInfo><Status><statusCode>000</statusCode><statusDescription>Normal</statusDescription></Status><Payment><TxnList count="1"><Txn ID="1"><txnType>10</txnType><txnSource>23</txnSource><amount>1200</amount><currency>AUD</currency><purchaseOrderNo>ORDER-ZYX8789</purchaseOrderNo><approved>Yes</approved><responseCode>00</responseCode><responseText>Approved</responseText><settlementDate>20180526</settlementDate><txnID>800055</txnID><authID>711736</authID><CreditCardInfo><pan>444433...111</pan><expiryDate>12/18</expiryDate><cardType>6</cardType><cardDescription>Visa</cardDescription></CreditCardInfo></Txn></TxnList></Payment></NABTransactMessage>

tests/Mock/SecureXMLEchoTestRequestSuccess.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
HTTP/1.1 100 Continue
2-
Server: Microsoft-IIS/5.0
2+
Server: Apache/2.4.29 (Ubuntu)
33
Date: Sat, 26 May 2018 07:25:31 GMT
44
HTTP/1.1 200 OK
5-
Server: Microsoft-IIS/5.0
5+
Server: Apache/2.4.29 (Ubuntu)
66
Date: Sat, 26 May 2018 07:25:31 GMT
77
Content-Type: text/xml;charset=ISO-8859-1
88
Content-Length: 929

tests/Mock/SecureXMLPurchaseRequestSendSuccess.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
HTTP/1.1 100 Continue
2-
Server: Microsoft-IIS/5.0
2+
Server: Apache/2.4.29 (Ubuntu)
33
Date: Sat, 26 May 2018 07:25:31 GMT
44
HTTP/1.1 200 OK
5-
Server: Microsoft-IIS/5.0
5+
Server: Apache/2.4.29 (Ubuntu)
66
Date: Sat, 26 May 2018 07:25:31 GMT
77
Content-Type: text/xml;charset=ISO-8859-1
88
Content-Length: 929

0 commit comments

Comments
 (0)