CoolCMS API

OrderPayment extends OrderPayment
in package

Matched payment of an order (many-to-many join, PK = order + paymentId). The composite PK protects against a duplicate payment callback: matching the same payment twice is a duplicate key and a no-op.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_eshop_order_payments'
#[TableAlias]
'orderPayment'

Table of Contents

Properties

$insertDatetime  : DateTime|null
$order  : Order|null
$paymentId  : int|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getInsertDatetime()  : DateTime|null
getOrder()  : TOrder|null
getPaymentId()  : int|null
setInsertDatetime()  : $this
setOrder()  : $this
setPaymentId()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$insertDatetime

protected DateTime|null $insertDatetime = null
Attributes
#[Column]
$name: 'insert_datetime'
$type: 'datetime'
#[ExternalReadonly]

$order

protected Order|null $order = null
Attributes
#[Id]
#[JoinColumn]
$name: 'cms_mod_eshop_orders_order_id'
$referencedColumnName: 'order_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Eshop\Models\Entities\Order::class
$inversedBy: 'payments'

$paymentId

protected int|null $paymentId = null
Attributes
#[Column]
$name: 'cms_system_payments_payment_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

Methods

__construct()

public __construct([mixed $order = null ][, int|null $paymentId = null ][, DateTime|null $insertDatetime = null ]) : mixed
Parameters
$order : mixed = null
$paymentId : int|null = null
$insertDatetime : DateTime|null = null

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAllTraits()

Returns all traits the class uses, including those used by parent classes and nested traits.

public getAllTraits() : array<string, string>
Return values
array<string, string>

getInsertDatetime()

public getInsertDatetime() : DateTime|null
Return values
DateTime|null

getOrder()

public getOrder() : TOrder|null
Return values
TOrder|null

getPaymentId()

public getPaymentId() : int|null
Return values
int|null

setInsertDatetime()

public setInsertDatetime(DateTime|null $insertDatetime) : $this
Parameters
$insertDatetime : DateTime|null
Return values
$this

setOrder()

public setOrder(TOrder|null $order) : $this
Parameters
$order : TOrder|null
Return values
$this

setPaymentId()

public setPaymentId(int|null $paymentId) : $this
Parameters
$paymentId : int|null
Return values
$this

getTraitsRecursive()

Walks the trait list recursively and collects nested traits too.

private static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
$traits : array<string, string>
Return values
array<string, string>
On this page

Search results