Skip to content

Commit

Permalink
Transaction: Add method getHash() for unique identifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Aug 6, 2020
1 parent eb5e914 commit 6af1d06
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Transaction.php
Expand Up @@ -78,6 +78,16 @@ public function isContainVariableSymbolInMessage(int $variableSymbol): bool
}


public function getHash(): string
{
return md5(
$this->getVariable() . '_' . $this->getKs() . '_' . $this->getSekv() . '_' . $this->getPrice()
. '_' . $this->getAccountName() . '_' . $this->getAccountNumber()
. '_' . $this->getNote() . '_' . $this->getDate()->format('Y-m-d')
);
}


public function getDate(): \DateTime
{
return $this->date;
Expand Down

0 comments on commit 6af1d06

Please sign in to comment.