PaymentGatewayNotification
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait
One notification a payment gateway sent about a payment, with the outcome of processing it.
Unlike PaymentTransaction (one row per gateway transaction, upserted) this is an append-only history: every return, webhook, retry or SMS receipt is a new row, including notifications about a payment that is already paid and that the gateway is therefore not even asked about. It holds no secrets and no raw payload, only what the gateway itself reports.
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'paymentGatewayNotification'
Table of Contents
Interfaces
- IdentifiableInterface
- Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).
Properties
- $amount : string|null
- $currencyCode : string|null
- $gatewayPaymentId : string|null
- $gatewayState : string|null
- Raw gateway state as received.
- $id : int|null
- $insertDatetime : DateTime
- $paymentGateId : int|null
- $paymentId : int|null
- $reason : string|null
- $reportedStatus : int|null
- Value of {@see \App\UI\Api\System\Enums\PaymentStatus} the gateway state was mapped to.
- $result : string
- Value of {@see \App\UI\Api\System\Models\Enums\GatewayNotificationResult}.
- $transport : string
- Value of {@see \App\UI\Api\System\Models\Enums\GatewayNotificationTransport}.
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.
- getAmount() : string|null
- getCurrencyCode() : string|null
- getGatewayPaymentId() : string|null
- getGatewayState() : string|null
- getId() : int|null
- getInsertDatetime() : DateTime
- getPaymentGateId() : int|null
- getPaymentId() : int|null
- getReason() : string|null
- getReportedStatus() : int|null
- getResult() : string
- getTransport() : string
- isPersisted() : bool
- setAmount() : $this
- setCurrencyCode() : $this
- setGatewayPaymentId() : $this
- setGatewayState() : $this
- setId() : $this
- setInsertDatetime() : $this
- setPaymentGateId() : $this
- setPaymentId() : $this
- setReason() : $this
- setReportedStatus() : $this
- setResult() : $this
- setTransport() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$amount
protected
string|null
$amount
= null
Attributes
- #[Column]
- $name: 'amount'
- $type: 'decimal'
- $precision: 15
- $scale: 3
- $nullable: true
$currencyCode
protected
string|null
$currencyCode
= null
Attributes
- #[Column]
- $name: 'currency_code'
- $type: 'string'
- $length: 3
- $nullable: true
$gatewayPaymentId
protected
string|null
$gatewayPaymentId
= null
Attributes
- #[Column]
- $name: 'gateway_payment_id'
- $type: 'string'
- $length: 255
- $nullable: true
$gatewayState
Raw gateway state as received.
protected
string|null
$gatewayState
= null
Attributes
- #[Column]
- $name: 'gateway_state'
- $type: 'string'
- $length: 64
- $nullable: true
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'payment_gateway_notification_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$paymentGateId
protected
int|null
$paymentGateId
= null
Attributes
- #[Column]
- $name: 'cms_system_payment_gates_payment_gate_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$paymentId
protected
int|null
$paymentId
= null
Attributes
- #[Column]
- $name: 'cms_system_payments_payment_id'
- $type: 'integer'
- $options: ['unsigned' => true]
$reason
protected
string|null
$reason
= null
Attributes
- #[Column]
- $name: 'reason'
- $type: 'string'
- $length: 255
- $nullable: true
$reportedStatus
Value of {@see \App\UI\Api\System\Enums\PaymentStatus} the gateway state was mapped to.
protected
int|null
$reportedStatus
= null
Attributes
- #[Column]
- $name: 'reported_status'
- $type: 'smallint'
- $nullable: true
$result
Value of {@see \App\UI\Api\System\Models\Enums\GatewayNotificationResult}.
protected
string
$result
= ''
Attributes
- #[Column]
- $name: 'result'
- $type: 'string'
- $length: 16
$transport
Value of {@see \App\UI\Api\System\Models\Enums\GatewayNotificationTransport}.
protected
string
$transport
= ''
Attributes
- #[Column]
- $name: 'transport'
- $type: 'string'
- $length: 16
Methods
__construct()
public
__construct([int|null $id = null ][, int|null $paymentId = null ][, int|null $paymentGateId = null ][, string $transport = '' ][, string|null $gatewayPaymentId = null ][, string|null $gatewayState = null ][, int|null $reportedStatus = null ][, string|null $amount = null ][, string|null $currencyCode = null ][, string $result = '' ][, string|null $reason = null ][, DateTime $insertDatetime = new DateTime() ]) : mixed
Parameters
- $id : int|null = null
- $paymentId : int|null = null
- $paymentGateId : int|null = null
- $transport : string = ''
- $gatewayPaymentId : string|null = null
- $gatewayState : string|null = null
- $reportedStatus : int|null = null
- $amount : string|null = null
- $currencyCode : string|null = null
- $result : string = ''
- $reason : string|null = null
- $insertDatetime : DateTime = new DateTime()
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>getAmount()
public
getAmount() : string|null
Return values
string|nullgetCurrencyCode()
public
getCurrencyCode() : string|null
Return values
string|nullgetGatewayPaymentId()
public
getGatewayPaymentId() : string|null
Return values
string|nullgetGatewayState()
public
getGatewayState() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetPaymentGateId()
public
getPaymentGateId() : int|null
Return values
int|nullgetPaymentId()
public
getPaymentId() : int|null
Return values
int|nullgetReason()
public
getReason() : string|null
Return values
string|nullgetReportedStatus()
public
getReportedStatus() : int|null
Return values
int|nullgetResult()
public
getResult() : string
Return values
stringgetTransport()
public
getTransport() : string
Return values
stringisPersisted()
public
isPersisted() : bool
Return values
boolsetAmount()
public
setAmount(string|null $amount) : $this
Parameters
- $amount : string|null
Return values
$thissetCurrencyCode()
public
setCurrencyCode(string|null $currencyCode) : $this
Parameters
- $currencyCode : string|null
Return values
$thissetGatewayPaymentId()
public
setGatewayPaymentId(string|null $gatewayPaymentId) : $this
Parameters
- $gatewayPaymentId : string|null
Return values
$thissetGatewayState()
public
setGatewayState(string|null $gatewayState) : $this
Parameters
- $gatewayState : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTime $insertDatetime) : $this
Parameters
- $insertDatetime : DateTime
Return values
$thissetPaymentGateId()
public
setPaymentGateId(int|null $paymentGateId) : $this
Parameters
- $paymentGateId : int|null
Return values
$thissetPaymentId()
public
setPaymentId(int|null $paymentId) : $this
Parameters
- $paymentId : int|null
Return values
$thissetReason()
public
setReason(string|null $reason) : $this
Parameters
- $reason : string|null
Return values
$thissetReportedStatus()
public
setReportedStatus(int|null $reportedStatus) : $this
Parameters
- $reportedStatus : int|null
Return values
$thissetResult()
public
setResult(string $result) : $this
Parameters
- $result : string
Return values
$thissetTransport()
public
setTransport(string $transport) : $this
Parameters
- $transport : string
Return values
$thisgetTraitsRecursive()
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>