33 lines
631 B
PHP
33 lines
631 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace KupShop\OrderingBundle\Entity;
|
|
|
|
use KupShop\KupShopBundle\Util\Price\Price;
|
|
|
|
class OrderPaymentEntity
|
|
{
|
|
public int $id;
|
|
public int $id_order;
|
|
|
|
public Price $price;
|
|
public \DateTimeImmutable $date;
|
|
|
|
public string $status;
|
|
|
|
public int $method;
|
|
|
|
public array $payment_data;
|
|
public array $order_payment_data;
|
|
|
|
public function getTransactionId(): ?string
|
|
{
|
|
if (!($transactionId = $this->payment_data['transactionID'] ?? $this->payment_data['session'] ?? '')) {
|
|
return null;
|
|
}
|
|
|
|
return (string) $transactionId;
|
|
}
|
|
}
|