CoolCMS API

PaymentGatewayNotification extends PaymentGatewayNotification
in package

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
#[Entity]
#[Table]
$name: 'cms_system_payment_gateway_notifications'
#[TableAlias]
'paymentGatewayNotification'

Table of Contents

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]

$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>

setAmount()

public setAmount(string|null $amount) : $this
Parameters
$amount : string|null
Return values
$this

setCurrencyCode()

public setCurrencyCode(string|null $currencyCode) : $this
Parameters
$currencyCode : string|null
Return values
$this

setGatewayPaymentId()

public setGatewayPaymentId(string|null $gatewayPaymentId) : $this
Parameters
$gatewayPaymentId : string|null
Return values
$this

setGatewayState()

public setGatewayState(string|null $gatewayState) : $this
Parameters
$gatewayState : string|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setInsertDatetime()

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

setPaymentGateId()

public setPaymentGateId(int|null $paymentGateId) : $this
Parameters
$paymentGateId : int|null
Return values
$this

setPaymentId()

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

setReason()

public setReason(string|null $reason) : $this
Parameters
$reason : string|null
Return values
$this

setReportedStatus()

public setReportedStatus(int|null $reportedStatus) : $this
Parameters
$reportedStatus : int|null
Return values
$this

setTransport()

public setTransport(string $transport) : $this
Parameters
$transport : string
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