Skip to content

Commit

Permalink
Check if we're updating the correct transaction by checking the Trans…
Browse files Browse the repository at this point in the history
…actionReference to the TransactionId as sent by icepay
  • Loading branch information
krijn-sb committed Mar 4, 2020
1 parent e6cb614 commit 2515ea0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Message/TransactionStatusRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2515ea0

Please sign in to comment.