src/Entity/OnlinePayment/PaymentOrder.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\OnlinePayment;
  3. use App\Validator\Constraints\PaymentSelected as AssertPaymentSelected;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\App\OnlinePayment\PaymentOrderRepository")
  7.  * @AssertPaymentSelected
  8.  */
  9. class PaymentOrder
  10. {
  11.     public const STATUS_PENDING 'PENDING';
  12.     public const STATUS_PAYED 'PAYED';
  13.     public const STATUS_ERROR 'ERROR';
  14.     public const STATUS_REFUSED 'REFUSED';
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     protected $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     protected $customerNumber;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     protected $status;
  28.     /**
  29.      * @ORM\Column(type="float")
  30.      *
  31.      * @var float
  32.      */
  33.     protected $amount;
  34.     /**
  35.      * @ORM\Column(type="datetime")
  36.      */
  37.     protected $transactionDate;
  38.     /**
  39.      * @ORM\Column(type="array")
  40.      *
  41.      * @var array
  42.      */
  43.     protected $invoices = [];
  44.     /**
  45.      * @ORM\Column(type="array")
  46.      *
  47.      * @var array
  48.      */
  49.     protected $deadlines = [];
  50.     /**
  51.      * @ORM\Column(type="string", length=255, nullable=true)
  52.      *
  53.      * @var string
  54.      */
  55.     protected $transactionStatus;
  56.     /**
  57.      * @ORM\Column(type="string", length=255, nullable=true)
  58.      *
  59.      * @var string
  60.      */
  61.     protected $transactionCard;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      *
  65.      * @var string
  66.      */
  67.     protected $transactionId;
  68.     /**
  69.      * @ORM\Column(type="string", length=50, nullable=true)
  70.      *
  71.      * @var string
  72.      */
  73.     protected $transactionReturn;
  74.     /**
  75.      * @return PaymentOrder
  76.      */
  77.     public function setId(string $id): self
  78.     {
  79.         $this->id $id;
  80.         return $this;
  81.     }
  82.     public function getId(): ?string
  83.     {
  84.         return $this->id;
  85.     }
  86.     public function getCustomerNumber(): ?string
  87.     {
  88.         return $this->customerNumber;
  89.     }
  90.     /**
  91.      * @return PaymentOrder
  92.      */
  93.     public function setCustomerNumber(string $customerNumber): self
  94.     {
  95.         $this->customerNumber $customerNumber;
  96.         return $this;
  97.     }
  98.     public function getStatus(): ?string
  99.     {
  100.         return $this->status;
  101.     }
  102.     /**
  103.      * @return PaymentOrder
  104.      */
  105.     public function setStatus(string $status): self
  106.     {
  107.         $this->status $status;
  108.         return $this;
  109.     }
  110.     public function getAmount(): float
  111.     {
  112.         return $this->amount;
  113.     }
  114.     public function setAmount(float $amount): PaymentOrder
  115.     {
  116.         $this->amount $amount;
  117.         return $this;
  118.     }
  119.     public function getTransactionDate(): ?\DateTimeInterface
  120.     {
  121.         return $this->transactionDate;
  122.     }
  123.     /**
  124.      * @return PaymentOrder
  125.      */
  126.     public function setTransactionDate(\DateTimeInterface $transactionDate): self
  127.     {
  128.         $this->transactionDate $transactionDate;
  129.         return $this;
  130.     }
  131.     public function getInvoices(): array
  132.     {
  133.         return $this->invoices;
  134.     }
  135.     /**
  136.      * @return PaymentOrder
  137.      */
  138.     public function setInvoices(array $invoices): self
  139.     {
  140.         $this->invoices $invoices;
  141.         return $this;
  142.     }
  143.     /**
  144.      * @return PaymentOrder
  145.      */
  146.     public function addInvoice(string $invoiceNumber): self
  147.     {
  148.         $this->invoices[] = $invoiceNumber;
  149.         return $this;
  150.     }
  151.     public function getDeadlines(): array
  152.     {
  153.         return $this->deadlines;
  154.     }
  155.     /**
  156.      * @return PaymentOrder
  157.      */
  158.     public function setDeadlines(array $deadlines): self
  159.     {
  160.         $this->deadlines $deadlines;
  161.         return $this;
  162.     }
  163.     /**
  164.      * @return PaymentOrder
  165.      */
  166.     public function addDeadline(string $deadlineId): self
  167.     {
  168.         $this->deadlines[] = $deadlineId;
  169.         return $this;
  170.     }
  171.     public function getTransactionStatus(): ?string
  172.     {
  173.         return $this->transactionStatus;
  174.     }
  175.     /**
  176.      * @return PaymentOrder
  177.      */
  178.     public function setTransactionStatus(?string $transactionStatus): self
  179.     {
  180.         $this->transactionStatus $transactionStatus;
  181.         return $this;
  182.     }
  183.     public function getTransactionCard(): ?string
  184.     {
  185.         return $this->transactionCard;
  186.     }
  187.     /**
  188.      * @return PaymentOrder
  189.      */
  190.     public function setTransactionCard(?string $transactionCard): self
  191.     {
  192.         $this->transactionCard $transactionCard;
  193.         return $this;
  194.     }
  195.     public function getTransactionId(): ?string
  196.     {
  197.         return $this->transactionId;
  198.     }
  199.     /**
  200.      * @return PaymentOrder
  201.      */
  202.     public function setTransactionId(?string $transactionId): self
  203.     {
  204.         $this->transactionId $transactionId;
  205.         return $this;
  206.     }
  207.     public function getTransactionReturn(): ?string
  208.     {
  209.         return $this->transactionReturn;
  210.     }
  211.     /**
  212.      * @return PaymentOrder
  213.      */
  214.     public function setTransactionReturn(?string $transactionReturn): self
  215.     {
  216.         $this->transactionReturn $transactionReturn;
  217.         return $this;
  218.     }
  219. }