diff --git a/src/Message/TransactionStatusRequest.php b/src/Message/TransactionStatusRequest.php index ef28af1..1fc2c21 100755 --- a/src/Message/TransactionStatusRequest.php +++ b/src/Message/TransactionStatusRequest.php @@ -77,6 +77,12 @@ private function getTransactionStatusFromPostBack(): ?TransactionStatusResponse $this->setContractProfileId($contentAsStdObj->ContractProfileId); + // Make sure we're updating the correct payment by reference, and not all of them. + // Note: $contentAsArray['Reference'] is not the same as TransactionReference. + if ($this->getTransactionReference() !== trim($contentAsArray['TransactionId'])) { + return null; + } + if ($this->validateSecurityHashMatch($this->httpRequest, $contentAsStdObj) === false) { return null; }