Save Gateway references in Transaction
This commit is contained in:
@@ -24,7 +24,7 @@ class Transaction
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* The monetary value to be received at target and issued at origin.
|
||||
* The monetary value received at target and issued at origin.
|
||||
*/
|
||||
#[Assert\Valid()]
|
||||
#[Assert\NotBlank()]
|
||||
@@ -47,6 +47,20 @@ class Transaction
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Accounting $target = null;
|
||||
|
||||
/**
|
||||
* The name of the Gateway implementation that secured the money in this Transaction.
|
||||
*/
|
||||
#[Assert\NotBlank()]
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $gateway = null;
|
||||
|
||||
/**
|
||||
* An external identifier provided by the Gateway for this Transaction.
|
||||
*/
|
||||
#[Assert\NotBlank()]
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $gatewayReference = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
@@ -87,4 +101,28 @@ class Transaction
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getGateway(): ?string
|
||||
{
|
||||
return $this->gateway;
|
||||
}
|
||||
|
||||
public function setGateway(string $gateway): static
|
||||
{
|
||||
$this->gateway = $gateway;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getGatewayReference(): ?string
|
||||
{
|
||||
return $this->gatewayReference;
|
||||
}
|
||||
|
||||
public function setGatewayReference(string $gatewayReference): static
|
||||
{
|
||||
$this->gatewayReference = $gatewayReference;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user