From 5459200663ee16c305c8e1f5137651b5de0349f5 Mon Sep 17 00:00:00 2001 From: Noel Light-Hilary Date: Sat, 2 Apr 2022 13:27:43 +0100 Subject: [PATCH] Prepare fields for recording more metadata about Gift Aid claim outcomes --- Readme.md | 13 +++++++++++++ src/Donation.php | 16 ++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/Readme.md b/Readme.md index 4ffd72f..f4036d1 100644 --- a/Readme.md +++ b/Readme.md @@ -6,3 +6,16 @@ communication. Currently it enables us, without hacks, to use Symfony Messenger to publish Donation messages from [MatchBot](https://github.com/thebiggive/matchbot) and then consume them with [ClaimBot](https://github.com/thebiggive/matchbot). + +## Changelog + +### v2.0.0 + +v2 comes alongside a new assumption about what it means for donations to be sent back +to MatchBot by ClaimBot – this no longer implies an error. Instead status information +is sent back regardless of outcome and so it is important to have a new field to +capture the fundamentals about the status. + +Although no fields are removed, because of the large downstream change in usage, this +update came with a new major version to reduce the risk of confusion between the two +approaches. diff --git a/src/Donation.php b/src/Donation.php index e86ca9b..c7c0143 100644 --- a/src/Donation.php +++ b/src/Donation.php @@ -19,4 +19,20 @@ class Donation public bool $sponsored = false; public string $org_hmrc_ref; public string $org_name; + + /** + * @var string|null From HMRC acknowledgement. Used for subsequent polling status checks and HMRC contact. + */ + public ?string $submissionCorrelationId = null; + + /** + * @var bool|null A minimal status flag: null when claim outcome is not yet determined, false for any + * kind of error and true for success. + */ + public ?bool $responseSuccess = null; + + /** + * @var string|null Once provided, finalised errors or "messages" value from HMRC. + */ + public ?string $responseDetail = null; }