diff --git a/src/GiftAid.php b/src/GiftAid.php index 326fbb2..256f313 100644 --- a/src/GiftAid.php +++ b/src/GiftAid.php @@ -37,7 +37,6 @@ class GiftAid extends GovTalk private string $vendorId = ''; private static string $singleClaimMessageClass = 'HMRC-CHAR-CLM'; - private static string $multiClaimMessageClass = 'HMRC-CHAR-CLM-MULTI'; /** * URI for product submitting the claim @@ -467,6 +466,10 @@ public function getGasdsAdjustment() * @param string $company The agent company's name. * @param array $address The agent company's address in the format specified above. * @param ?array $contact The agent company's key contact (optional, may be skipped with a null value). + * If `['name']['surname']` is empty or not set, the whole name will be skipepd. + * This is done to enable just 'telephone' to be provided for claims where an + * `AgtOrNom` element is to be set up with an organisation name and the required + * phone number, but not other personal Agent information. * @param ?string $reference An identifier for the agent's own reference (optional). * @return bool Whether company format was as expected & agent data was set. */ @@ -522,8 +525,8 @@ public function setAgentDetails( * 'aggregation' => (?string) Description of aggregated donations up to 35 * characters, if applicable * 'amount' => (float) In whole pounds GBP - * 'org_name' => (?string) Required for Agent multi-charity claims. Ignored for others. - * 'org_hmrc_ref' => (?string) Required for Agent multi-charity claims. Ignored for others. + * 'org_name' => (?string) Required for Agent/Nominee [not Collection Agent] claims. Ignored for others. + * 'org_hmrc_ref' => (?string) Required for Agent/Nominee [not Collection Agent] claims. Ignored for others. * ] * @return string */ @@ -539,10 +542,10 @@ private function buildClaimXml(array $donations): string $earliestDate = strtotime(date('Y-m-d')); foreach ($donations as $index => $d) { - if ($this->isAgentMultiClaim()) { + if ($this->isAgentClaim()) { if (empty($d['org_hmrc_ref'])) { $this->logger->warning(sprintf( - 'Skipping donation index %d (%s %s) with no org ref in agent multi mode', + 'Skipping donation index %d (%s %s) with no org ref in agent mode', $index, $d['first_name'], $d['last_name'], @@ -653,7 +656,7 @@ public function giftAidSubmit($donor_data) } // It seems like only single org / direct claims use/need the Authorised Official. - if (!$this->isAgentMultiClaim() && $this->getAuthorisedOfficial() === null) { + if (!$this->isAgentClaim() && $this->getAuthorisedOfficial() === null) { $this->logger->error('Cannot proceed without authorisedOfficial'); return false; } @@ -664,7 +667,7 @@ public function giftAidSubmit($donor_data) $cOrganisation = 'IR'; $sDefaultCurrency = 'GBP'; // currently HMRC only allows GBP $sIRmark = 'IRmark+Token'; - $sSender = $this->isAgentMultiClaim() ? 'Agent' : 'Individual'; + $sSender = $this->isAgentClaim() ? 'Agent' : 'Individual'; // Set the message envelope $this->setMessageClass($this->getMessageClass()); @@ -699,7 +702,7 @@ public function giftAidSubmit($donor_data) $package->endElement(); # Keys $package->writeElement('PeriodEnd', $dReturnPeriod); - if ($this->isAgentMultiClaim()) { + if ($this->isAgentClaim()) { $package->startElement('Agent'); $package->writeElement('Company', $this->agentDetails['company']); @@ -717,7 +720,7 @@ public function giftAidSubmit($donor_data) $package->writeElement('Country', $this->agentDetails['address']['country']); $package->endElement(); // Address - if (isset($this->agentDetails['contact'])) { + if (isset($this->agentDetails['contact']) && !empty($this->agentDetails['contact']['name']['surname'])) { $package->startElement('Contact'); $package->startElement('Name'); @@ -760,12 +763,26 @@ public function giftAidSubmit($donor_data) $package->startElement('R68'); - if ($this->isAgentMultiClaim()) { - $package->startElement('CollAgent'); - $package->writeElement('AgentNo', $this->agentDetails['number']); + if ($this->isAgentClaim()) { + $package->startElement('AgtOrNom'); + $package->writeElement('OrgName', $this->agentDetails['company']); + $package->writeElement('RefNo', $this->agentDetails['number']); $claimNo = $this->agentDetails['reference'] ?? uniqid(); $package->writeElement('ClaimNo', $claimNo); - $package->endElement(); // CollAgent + + // Note we never set `PayToAoN`. => HMRC always pay to the charity direct. + + $package->startElement('AoNID'); + if (empty($this->agentDetails['address']['postcode'])) { + $package->writeElement('Overseas', 'yes'); + } else { + $package->writeElement('Postcode', $this->agentDetails['address']['postcode']); + } + $package->endElement(); // AoNID + + $package->writeElement('Phone', $this->agentDetails['contact']['telephone']); + + $package->endElement(); // AgtOrNom } else { $package->startElement('AuthOfficial'); $package->startElement('OffName'); @@ -978,7 +995,7 @@ protected function packageDigest($package) return $package; } - protected function isAgentMultiClaim(): bool + protected function isAgentClaim(): bool { return !empty($this->agentDetails); } @@ -988,7 +1005,7 @@ protected function isAgentMultiClaim(): bool */ protected function getMessageClass(): string { - return $this->isAgentMultiClaim() ? static::$multiClaimMessageClass : static::$singleClaimMessageClass; + return static::$singleClaimMessageClass; } /** @@ -996,14 +1013,12 @@ protected function getMessageClass(): string */ protected function getCharIdKey(): string { - return $this->isAgentMultiClaim() ? 'AGENTCHARID' : 'CHARID'; + return 'CHARID'; } protected function getCharIdValue(): string { - return $this->isAgentMultiClaim() - ? $this->agentDetails['number'] - : $this->getClaimingOrganisation()->getHmrcRef(); + return $this->getClaimingOrganisation()->getHmrcRef(); } protected function writeClaimStartData(XMLWriter $package, ClaimingOrganisation $org): void @@ -1012,21 +1027,17 @@ protected function writeClaimStartData(XMLWriter $package, ClaimingOrganisation $package->writeElement('OrgName', $org->getName()); $package->writeElement('HMRCref', $org->getHmrcRef()); - // LTS response code 7032: "Regulator details must not be present if - // Collecting Agent details are present" - if (!$this->isAgentMultiClaim()) { - $package->startElement('Regulator'); + $package->startElement('Regulator'); - if ($org->getRegulator() === null) { - $package->writeElement('NoReg', 'yes'); - } elseif ($org->hasStandardRegulator()) { - $package->writeElement('RegName', $org->getRegulator()); - } else { - $package->writeElement('OtherReg', $org->getRegulator()); - } - $package->writeElement('RegNo', $org->getRegNo()); - $package->endElement(); # Regulator + if ($org->getRegulator() === null) { + $package->writeElement('NoReg', 'yes'); + } elseif ($org->hasStandardRegulator()) { + $package->writeElement('RegName', $org->getRegulator()); + } else { + $package->writeElement('OtherReg', $org->getRegulator()); } + $package->writeElement('RegNo', $org->getRegNo()); + $package->endElement(); # Regulator $package->startElement('Repayment'); } @@ -1040,49 +1051,45 @@ protected function writeClaimEndData(XMLWriter $package, $earliestDate): void } $package->endElement(); # Repayment - // LTS response code 7044: "A submission from a Collecting Agent must not include - // details of Gift Aid Small Donations Schemes" - if (!$this->isAgentMultiClaim()) { - $package->startElement('GASDS'); - $package->writeElement( - 'ConnectedCharities', - $this->getClaimingOrganisation()->getHasConnectedCharities() ? 'yes' : 'no' - ); - foreach ($this->getClaimingOrganisation()->getConnectedCharities() as $cc) { - $package->startElement('Charity'); - $package->writeElement('Name', $cc->getName()); - $package->writeElement('HMRCref', $cc->getHmrcRef()); - $package->endElement(); # Charity - } - if ($this->haveGasds()) { - foreach ($this->gasdsYear as $key => $val) { - $package->startElement('GASDSClaim'); - $package->writeElement('Year', $this->gasdsYear[$key]); - $package->writeElement('Amount', number_format($this->gasdsAmount[$key], 2, '.', '')); - $package->endElement(); # GASDSClaim - } - } - - $package->writeElement('CommBldgs', ($this->haveCbcd == true) ? 'yes' : 'no'); - foreach ($this->cbcdAddr as $key => $val) { - $package->startElement('Building'); - $package->writeElement('BldgName', $this->cbcdBldg[$key]); - $package->writeElement('Address', $this->cbcdAddr[$key]); - $package->writeElement('Postcode', $this->cbcdPoCo[$key]); - $package->startElement('BldgClaim'); - $package->writeElement('Year', $this->cbcdYear[$key]); - $package->writeElement('Amount', number_format($this->cbcdAmount[$key], 2, '.', '')); - $package->endElement(); # BldgClaim - $package->endElement(); # Building + $package->startElement('GASDS'); + $package->writeElement( + 'ConnectedCharities', + $this->getClaimingOrganisation()->getHasConnectedCharities() ? 'yes' : 'no' + ); + foreach ($this->getClaimingOrganisation()->getConnectedCharities() as $cc) { + $package->startElement('Charity'); + $package->writeElement('Name', $cc->getName()); + $package->writeElement('HMRCref', $cc->getHmrcRef()); + $package->endElement(); # Charity + } + if ($this->haveGasds()) { + foreach ($this->gasdsYear as $key => $val) { + $package->startElement('GASDSClaim'); + $package->writeElement('Year', $this->gasdsYear[$key]); + $package->writeElement('Amount', number_format($this->gasdsAmount[$key], 2, '.', '')); + $package->endElement(); # GASDSClaim } + } - if (!empty($this->gasdsAdjustment)) { - $package->writeElement('Adj', number_format($this->gasdsAdjustment, 2, '.', '')); - } + $package->writeElement('CommBldgs', ($this->haveCbcd == true) ? 'yes' : 'no'); + foreach ($this->cbcdAddr as $key => $val) { + $package->startElement('Building'); + $package->writeElement('BldgName', $this->cbcdBldg[$key]); + $package->writeElement('Address', $this->cbcdAddr[$key]); + $package->writeElement('Postcode', $this->cbcdPoCo[$key]); + $package->startElement('BldgClaim'); + $package->writeElement('Year', $this->cbcdYear[$key]); + $package->writeElement('Amount', number_format($this->cbcdAmount[$key], 2, '.', '')); + $package->endElement(); # BldgClaim + $package->endElement(); # Building + } - $package->endElement(); # GASDS + if (!empty($this->gasdsAdjustment)) { + $package->writeElement('Adj', number_format($this->gasdsAdjustment, 2, '.', '')); } + $package->endElement(); # GASDS + $otherInfo = []; if (!empty($this->gasdsAdjustment)) { $otherInfo[] = $this->gasdsAdjReason; diff --git a/tests/GovTalk/GiftAid/GiftAidTest.php b/tests/GovTalk/GiftAid/GiftAidTest.php index e33692f..bc90846 100644 --- a/tests/GovTalk/GiftAid/GiftAidTest.php +++ b/tests/GovTalk/GiftAid/GiftAidTest.php @@ -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' => 'billie@example.org', + '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'; } diff --git a/tests/GovTalk/GiftAid/Mock/ClaimResponsePoll.xml b/tests/GovTalk/GiftAid/Mock/ClaimResponsePoll.xml new file mode 100644 index 0000000..9e7b7dc --- /dev/null +++ b/tests/GovTalk/GiftAid/Mock/ClaimResponsePoll.xml @@ -0,0 +1 @@ +2.0
HMRC-CHAR-CLMresponsesubmit123456https://secure.dev.gateway.gov.uk/pollXML2022-04-04T14:56:57.187
(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()))someDigestsomeSig==someCert=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.Thank you for your submission2022-04-04T08:53:35.179
diff --git a/tests/GovTalk/GiftAid/Mock/MultiClaimResponsePoll.xml b/tests/GovTalk/GiftAid/Mock/MultiClaimResponsePoll.xml deleted file mode 100644 index 41daa51..0000000 --- a/tests/GovTalk/GiftAid/Mock/MultiClaimResponsePoll.xml +++ /dev/null @@ -1 +0,0 @@ -2.0
HMRC-CHAR-CLM-MULTIresponsesubmit123456https://secure.dev.gateway.gov.uk/pollXML2022-04-04T14:56:57.187
(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()))someDigestsomeSig==someCert=HMRC has received the HMRC-CHAR-CLM-MULTI 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.Thank you for your submission2022-04-04T08:53:35.179
diff --git a/tests/GovTalk/GiftAid/Mock/SubmitMultiAckResponse.xml b/tests/GovTalk/GiftAid/Mock/SubmitMultiAckResponse.xml deleted file mode 100644 index 959a830..0000000 --- a/tests/GovTalk/GiftAid/Mock/SubmitMultiAckResponse.xml +++ /dev/null @@ -1 +0,0 @@ - 2.0
HMRC-CHAR-CLM-MULTI response submit 9072983591062099772 http://localhost:5665/LTS/LTSServlet XML 2021-10-08T11:24:58.024
(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())) yPwKM0owwwzn3saHOT4rj02rqU0= ov+vziKsXzCpAHOZskSSp5yJptHB+fFilM8iaV3Agy7W9/xyqQfj98+uiOBqP73mwUzmZ9dyF7OQXIg75X/AgwNUHKGvId7i+L+XxlvCDoPm1QwBX+wliaCLXEXC9u2QHTDjz+8sUjyogZDlHJJdvfgEnhrX9kT4Ge9C4TAQRtQ= MIIDKTCCApKgAwIBAgIBAjANBgkqhkiG9w0BAQQFADB1MQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxGTAXBgNVBAcTEE9ha2Jyb29rIFRlcnJhY2UxEDAOBgNVBAoTB1NhcnZlZ2ExEDAOBgNVBAsTB1N1cHBvcnQxFDASBgNVBAMTC1NhcnZlZ2FEZW1vMB4XDTA0MTAwNzE2MDYwOFoXDTI5MTAwMTE2MDYwOFoweTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMRkwFwYDVQQHExBPYWticm9vayBUZXJyYWNlMRAwDgYDVQQKEwdTYXJ2ZWdhMRAwDgYDVQQLEwdTdXBwb3J0MRgwFgYDVQQDEw9TYXJ2ZWdhRGVtb0NlcnQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOuak58DVFSXNRJzyvthjWYBn+yQX67cemqa1ZVF460RuwOCODZJHP8KlLnrJyZHVuBzlA0yHGKz5ABjpj/N7/IWxrC4LEH0Tuw1WCqaDTaSV2AtyEs7fgtopit6KM/yMGwqrDSHcuMi++yr5ynhfOS5uWZ9dSYwwmCtLmEauayfAgMBAAGjgcQwgcEwHQYDVR0OBBYEFH5QwQCCP0EqP0vwyRifonAT46ooMIGfBgNVHSMEgZcwgZSAFGU/dbDLz6UwZVm9DPwTghnj4tt6oXmkdzB1MQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxGTAXBgNVBAcTEE9ha2Jyb29rIFRlcnJhY2UxEDAOBgNVBAoTB1NhcnZlZ2ExEDAOBgNVBAsTB1N1cHBvcnQxFDASBgNVBAMTC1NhcnZlZ2FEZW1vggEAMA0GCSqGSIb3DQEBBAUAA4GBAJ7UjONH53zehnwbxNmLsr2FtdDSkQL9JFPEctPrjThu8w+4m/C8u+spUnIdPr9P3f5870L3/+EcePsXAc00xx4uqsrCkCD2unpKO7ZO0fqmvd2dMQqpcQv5Lm7jQa1HpmRcNwGiQhslp0K+oCxds2w4jZWt7W/l/H0Htg6kRnzD HMRC has received the HMRC-CHAR-CLM-MULTI document ref: 92100000495393 at 11.24 on 08/10/2021. The associated IRmark was: ZD6AUM2KGDBQZZ66Y2DTSPRLR5G2XKKN. 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. Thank you for your submission 2021-10-08T11:24:58.024
diff --git a/tests/GovTalk/GiftAid/Mock/SubmitMultiMissingNamesResponse.xml b/tests/GovTalk/GiftAid/Mock/SubmitMultiMissingNamesResponse.xml deleted file mode 100644 index 0a8c825..0000000 --- a/tests/GovTalk/GiftAid/Mock/SubmitMultiMissingNamesResponse.xml +++ /dev/null @@ -1 +0,0 @@ - 2.0
HMRC-CHAR-CLM-MULTI error submit 986769003220431383 http://localhost:5665/LTS/LTSServlet XML 2021-10-08T11:29:02.029
ChRIS 3001 business Your submission failed due to business validation errors. Please see below for details. 4 ChRIS 4065 schema Invalid content found at element 'Sur' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Sur[1] cvc-type.3.1.3: The value '' of element 'Sur' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Sur[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_SurDonorGADRepaymentClaimR68'. ChRIS 4065 schema Invalid content found at element 'Fore' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Fore[1] cvc-type.3.1.3: The value '' of element 'Fore' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Fore[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_ForeDonorGADRepaymentClaimR68'.
diff --git a/tests/GovTalk/GiftAid/Mock/SubmitMultiMultipleErrorsResponse.xml b/tests/GovTalk/GiftAid/Mock/SubmitMultiMultipleErrorsResponse.xml deleted file mode 100644 index 136a549..0000000 --- a/tests/GovTalk/GiftAid/Mock/SubmitMultiMultipleErrorsResponse.xml +++ /dev/null @@ -1 +0,0 @@ - 2.0
HMRC-CHAR-CLM-MULTI error submit 6359058085579170979 http://localhost:5665/LTS/LTSServlet XML 2021-10-12T18:09:03.009
ChRIS 3001 business Your submission failed due to business validation errors. Please see below for details. 8 ChRIS 4065 schema Invalid content found at element 'Sur' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[2]/r68:Donor[1]/r68:Sur[1] cvc-type.3.1.3: The value '' of element 'Sur' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[2]/r68:Donor[1]/r68:Sur[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_SurDonorGADRepaymentClaimR68'. ChRIS 4065 schema Invalid content found at element 'Fore' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[2]/r68:Donor[1]/r68:Fore[1] cvc-type.3.1.3: The value '' of element 'Fore' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[2]/r68:Donor[1]/r68:Fore[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_ForeDonorGADRepaymentClaimR68'. ChRIS 4065 schema Invalid content found at element 'Sur' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Sur[1] cvc-type.3.1.3: The value '' of element 'Sur' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Sur[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_SurDonorGADRepaymentClaimR68'. ChRIS 4065 schema Invalid content found at element 'Fore' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Fore[1] cvc-type.3.1.3: The value '' of element 'Fore' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Fore[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_ForeDonorGADRepaymentClaimR68'.
diff --git a/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimAckResponse.xml b/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimAckResponse.xml new file mode 100644 index 0000000..cc9f53c --- /dev/null +++ b/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimAckResponse.xml @@ -0,0 +1 @@ + 2.0
HMRC-CHAR-CLM response submit 9072983591062099772 http://localhost:5665/LTS/LTSServlet XML 2021-10-08T11:24:58.024
(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())) yPwKM0owwwzn3saHOT4rj02rqU0= ov+vziKsXzCpAHOZskSSp5yJptHB+fFilM8iaV3Agy7W9/xyqQfj98+uiOBqP73mwUzmZ9dyF7OQXIg75X/AgwNUHKGvId7i+L+XxlvCDoPm1QwBX+wliaCLXEXC9u2QHTDjz+8sUjyogZDlHJJdvfgEnhrX9kT4Ge9C4TAQRtQ= MIIDKTCCApKgAwIBAgIBAjANBgkqhkiG9w0BAQQFADB1MQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxGTAXBgNVBAcTEE9ha2Jyb29rIFRlcnJhY2UxEDAOBgNVBAoTB1NhcnZlZ2ExEDAOBgNVBAsTB1N1cHBvcnQxFDASBgNVBAMTC1NhcnZlZ2FEZW1vMB4XDTA0MTAwNzE2MDYwOFoXDTI5MTAwMTE2MDYwOFoweTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMRkwFwYDVQQHExBPYWticm9vayBUZXJyYWNlMRAwDgYDVQQKEwdTYXJ2ZWdhMRAwDgYDVQQLEwdTdXBwb3J0MRgwFgYDVQQDEw9TYXJ2ZWdhRGVtb0NlcnQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOuak58DVFSXNRJzyvthjWYBn+yQX67cemqa1ZVF460RuwOCODZJHP8KlLnrJyZHVuBzlA0yHGKz5ABjpj/N7/IWxrC4LEH0Tuw1WCqaDTaSV2AtyEs7fgtopit6KM/yMGwqrDSHcuMi++yr5ynhfOS5uWZ9dSYwwmCtLmEauayfAgMBAAGjgcQwgcEwHQYDVR0OBBYEFH5QwQCCP0EqP0vwyRifonAT46ooMIGfBgNVHSMEgZcwgZSAFGU/dbDLz6UwZVm9DPwTghnj4tt6oXmkdzB1MQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxGTAXBgNVBAcTEE9ha2Jyb29rIFRlcnJhY2UxEDAOBgNVBAoTB1NhcnZlZ2ExEDAOBgNVBAsTB1N1cHBvcnQxFDASBgNVBAMTC1NhcnZlZ2FEZW1vggEAMA0GCSqGSIb3DQEBBAUAA4GBAJ7UjONH53zehnwbxNmLsr2FtdDSkQL9JFPEctPrjThu8w+4m/C8u+spUnIdPr9P3f5870L3/+EcePsXAc00xx4uqsrCkCD2unpKO7ZO0fqmvd2dMQqpcQv5Lm7jQa1HpmRcNwGiQhslp0K+oCxds2w4jZWt7W/l/H0Htg6kRnzD HMRC has received the HMRC-CHAR-CLM document ref: 92100000495393 at 11.24 on 08/10/2021. The associated IRmark was: ZD6AUM2KGDBQZZ66Y2DTSPRLR5G2XKKN. 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. Thank you for your submission 2021-10-08T11:24:58.024
diff --git a/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimMissingNamesResponse.xml b/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimMissingNamesResponse.xml new file mode 100644 index 0000000..4610e7e --- /dev/null +++ b/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimMissingNamesResponse.xml @@ -0,0 +1 @@ + 2.0
HMRC-CHAR-CLM error submit 986769003220431383 http://localhost:5665/LTS/LTSServlet XML 2021-10-08T11:29:02.029
ChRIS 3001 business Your submission failed due to business validation errors. Please see below for details. 4 ChRIS 4065 schema Invalid content found at element 'Sur' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Sur[1] cvc-type.3.1.3: The value '' of element 'Sur' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Sur[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_SurDonorGADRepaymentClaimR68'. ChRIS 4065 schema Invalid content found at element 'Fore' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Fore[1] cvc-type.3.1.3: The value '' of element 'Fore' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Fore[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_ForeDonorGADRepaymentClaimR68'.
diff --git a/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimMultipleErrorsResponse.xml b/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimMultipleErrorsResponse.xml new file mode 100644 index 0000000..966aa9f --- /dev/null +++ b/tests/GovTalk/GiftAid/Mock/SubmitNomineeClaimMultipleErrorsResponse.xml @@ -0,0 +1 @@ + 2.0
HMRC-CHAR-CLM error submit 6359058085579170979 http://localhost:5665/LTS/LTSServlet XML 2021-10-12T18:09:03.009
ChRIS 3001 business Your submission failed due to business validation errors. Please see below for details. 8 ChRIS 4065 schema Invalid content found at element 'Sur' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[2]/r68:Donor[1]/r68:Sur[1] cvc-type.3.1.3: The value '' of element 'Sur' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[2]/r68:Donor[1]/r68:Sur[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_SurDonorGADRepaymentClaimR68'. ChRIS 4065 schema Invalid content found at element 'Fore' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[2]/r68:Donor[1]/r68:Fore[1] cvc-type.3.1.3: The value '' of element 'Fore' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[2]/r68:Donor[1]/r68:Fore[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_ForeDonorGADRepaymentClaimR68'. ChRIS 4065 schema Invalid content found at element 'Sur' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Sur[1] cvc-type.3.1.3: The value '' of element 'Sur' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Sur[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_SurDonorGADRepaymentClaimR68'. ChRIS 4065 schema Invalid content found at element 'Fore' /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Fore[1] cvc-type.3.1.3: The value '' of element 'Fore' is not valid. ChRIS 4082 schema Value '' has an incorrect length /hd:GovTalkMessage[1]/hd:Body[1]/r68:IRenvelope[1]/r68:R68[1]/r68:Claim[1]/r68:Repayment[1]/r68:GAD[1]/r68:Donor[1]/r68:Fore[1] cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_ForeDonorGADRepaymentClaimR68'.