-
Notifications
You must be signed in to change notification settings - Fork 3
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 #13 from thebiggive/CLA-25-fix-agent-element
CLA-25 – set up Agents' claims so payment is directly to charities
- Loading branch information
Showing
10 changed files
with
92 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -401,9 +401,9 @@ public function testClaimWithCommunityBuildingsSubmissionAck(): void | |
$this->assertSame('A19FA1A31BCB42D887EA323292AACD88', $response['correlationid']); | ||
} | ||
|
||
public function testMultiClaimSubmissionAck(): void | ||
public function testNomineeClaimSubmissionAck(): void | ||
{ | ||
$this->setMockHttpResponse('SubmitMultiAckResponse.xml'); | ||
$this->setMockHttpResponse('SubmitNomineeClaimAckResponse.xml'); | ||
$this->gaService = $this->setUpService(); // Use client w/ mock queue. | ||
|
||
$this->gaService->setAuthorisedOfficial($this->officer); | ||
|
@@ -428,9 +428,9 @@ public function testMultiClaimSubmissionAck(): void | |
$this->assertSame('9072983591062099772', $response['correlationid']); | ||
} | ||
|
||
public function testMultiClaimSubmissionAckWithOfficialAndAgentOptionalFields(): void | ||
public function testNomineeClaimSubmissionAckWithOfficialAndAgentOptionalFields(): void | ||
{ | ||
$this->setMockHttpResponse('SubmitMultiAckResponse.xml'); | ||
$this->setMockHttpResponse('SubmitNomineeClaimAckResponse.xml'); | ||
$this->gaService = $this->setUpService(); // Use client w/ mock queue. | ||
|
||
$this->officer->setTitle('Mx'); | ||
|
@@ -457,9 +457,9 @@ public function testMultiClaimSubmissionAckWithOfficialAndAgentOptionalFields(): | |
$this->assertSame('9072983591062099772', $response['correlationid']); | ||
} | ||
|
||
public function testMultiClaimSubmissionWithFirstDonationNamesMissing(): void | ||
public function testNomineeClaimSubmissionWithFirstDonationNamesMissing(): void | ||
{ | ||
$this->setMockHttpResponse('SubmitMultiMissingNamesResponse.xml'); | ||
$this->setMockHttpResponse('SubmitNomineeClaimMissingNamesResponse.xml'); | ||
$this->gaService = $this->setUpService(); // Use client w/ mock queue. | ||
|
||
// Provide identifier to trace donation errors, and give the 0th donation one by clearing | ||
|
@@ -510,11 +510,11 @@ public function testMultiClaimSubmissionWithFirstDonationNamesMissing(): void | |
$this->assertEquals(['some-uuid-1234'], $response['donation_ids_with_errors']); | ||
} | ||
|
||
public function testMultiClaimSubmissionWithMultipleDonationErrors(): void | ||
public function testNomineeClaimSubmissionWithMultipleDonationErrors(): void | ||
{ | ||
// We separately test this to be confident the correct errors map back | ||
// to the correct donation IDs. | ||
$this->setMockHttpResponse('SubmitMultiMultipleErrorsResponse.xml'); | ||
$this->setMockHttpResponse('SubmitNomineeClaimMultipleErrorsResponse.xml'); | ||
$this->gaService = $this->setUpService(); // Use client w/ mock queue. | ||
|
||
// Provide identifier to trace donation errors, and give the 0th donation one by clearing | ||
|
@@ -588,9 +588,9 @@ public function testDeclarationResponsePoll(): void | |
$this->assertSame('A19FA1A31BCB42D887EA323292AACD88', $response['correlationid']); | ||
} | ||
|
||
public function testMultiClaimPollSuccessAndResponseDataFormat(): void | ||
public function testPollSuccessAndResponseDataFormat(): void | ||
{ | ||
$this->setMockHttpResponse('MultiClaimResponsePoll.xml'); | ||
$this->setMockHttpResponse('ClaimResponsePoll.xml'); | ||
$this->gaService = $this->setUpService(); // Use client w/ mock queue. | ||
|
||
$response = $this->gaService->declarationResponsePoll( | ||
|
@@ -663,6 +663,7 @@ private function addValidTestAgent(GiftAid $giftAidService, bool $withOptionalFi | |
'surname' => 'Bravo', | ||
], | ||
'email' => '[email protected]', | ||
'telephone' => '01111 111112', | ||
]; | ||
|
||
$agentAddress = [ | ||
|
@@ -674,8 +675,6 @@ private function addValidTestAgent(GiftAid $giftAidService, bool $withOptionalFi | |
|
||
if ($withOptionalFields) { | ||
$agentContact['fax'] = '01111 111111'; | ||
$agentContact['telephone'] = '01111 111112'; | ||
|
||
$agentAddress['postcode'] = 'N1 1AA'; | ||
} | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<?xml version='1.0' encoding='UTF-8'?><GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope"><EnvelopeVersion>2.0</EnvelopeVersion><Header><MessageDetails><Class>HMRC-CHAR-CLM</Class><Qualifier>response</Qualifier><Function>submit</Function><TransactionID>123</TransactionID><CorrelationID>456</CorrelationID><ResponseEndPoint PollInterval="10">https://secure.dev.gateway.gov.uk/poll</ResponseEndPoint><Transformation>XML</Transformation><GatewayTimestamp>2022-04-04T14:56:57.187</GatewayTimestamp></MessageDetails><SenderDetails/></Header><GovTalkDetails><Keys></Keys></GovTalkDetails><Body><SuccessResponse xmlns="http://www.inlandrevenue.gov.uk/SuccessResponse"><IRmarkReceipt><dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><dsig:Reference><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"><dsig:XPath>(count(ancestor-or-self::node()|/gti:GovTalkMessage/gti:Body)=count(ancestor-or-self::node())) and (count(ancestor-or-self::node()|/gti:GovTalkMessage/gti:Body/*[name()='IRenvelope']/*[name()='IRheader']/*[name()='IRmark'])!=count(ancestor-or-self::node()))</dsig:XPath></dsig:Transform><dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>someDigest</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>someSig==</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>someCert=</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo></dsig:Signature><Message code="0000">HMRC has received the HMRC-CHAR-CLM document ref: 92100000000000 at 08.53 on 04/04/2022. The associated IRmark was: 7QAAAAA000000AAAAAAAAA. We strongly recommend that you keep this receipt electronically, and we advise that you also keep your submission electronically for your records. They are evidence of the information that you submitted to HMRC.</Message></IRmarkReceipt><Message code="077001">Thank you for your submission</Message><AcceptedTime>2022-04-04T08:53:35.179</AcceptedTime></SuccessResponse></Body></GovTalkMessage> |
Oops, something went wrong.