Payment extends AbstractUniqueEntity
in package

Tags
since
1.5.0
see
PaymentRepository

Table of Contents

$amount  : float
$bookingId  : int
$currency  : string
$gatewayId  : string
$gatewayMode  : string
$id  : int
$paymentMethod  : string
$status  : string
$transactionId  : string
$uid  : string
Unique identifier. Most likely is UUID v4.
__construct()  : mixed
addLog()  : int|false
getAmount()  : float
getBooking()  : Booking|null
getExpectingBooking()  : Booking|null
getExpirationTime()  : int
getGateway()  : PaymentGatewayInterface|null
getId()  : int
getLogs()  : array<string|int, WP_Comment>
getUid()  : string
isCompleted()  : bool
isFailed()  : bool
isPending()  : bool
removeExpirationTime()  : mixed
resetExpirationTime()  : mixed
Set the expiration time to current time + pending payment time.
setExpirationTime()  : mixed
setGatewayMode()  : mixed
setPaymentMethod()  : mixed
setTransactionId()  : mixed
setupFields()  : mixed

Properties

$amount

public float $amount = 0.0
Tags
since
1.5.0

$bookingId

public int $bookingId = 0
Tags
since
1.5.0

$currency

public string $currency = 'EUR'
Tags
since
1.5.0

$gatewayId

public string $gatewayId = 'manual'
Tags
since
1.5.0

$gatewayMode

public string $gatewayMode = \MotoPress\Appointment\MODE_LIVE
Tags
since
1.5.0

$id

public int $id = 0
Tags
since
1.0

$paymentMethod

public string $paymentMethod = ''
Tags
since
1.5.0

$status

public string $status = 'new'
Tags
since
1.5.0

$transactionId

public string $transactionId = ''
Tags
since
1.5.0

$uid

Unique identifier. Most likely is UUID v4.

public string $uid = ''
Tags
since
1.5.0

Methods

__construct()

public __construct(int $id[, array<string|int, mixed> $fieldValues = [] ]) : mixed
Parameters
$id : int
$fieldValues : array<string|int, mixed> = []

Optional.

Tags
since
1.0
Return values
mixed

addLog()

public addLog(string $message[, int|null $authorId = null ]) : int|false
Parameters
$message : string
$authorId : int|null = null

Optional. Current logged in user ID by default.

Tags
since
1.14.0
Return values
int|false

The new comment's ID on success, false on failure.

getAmount()

public getAmount() : float
Tags
since
1.5.0
Return values
float

getBooking()

public getBooking() : Booking|null
Tags
since
1.5.0
Return values
Booking|null

getExpectingBooking()

public getExpectingBooking() : Booking|null
Tags
since
1.5.0
Return values
Booking|null

getExpirationTime()

public getExpirationTime() : int
Tags
since
1.5.0
Return values
int

getId()

public getId() : int
Tags
since
1.11.0
Return values
int

getLogs()

public getLogs() : array<string|int, WP_Comment>
Tags
since
1.14.0
Return values
array<string|int, WP_Comment>

Logs in descending order.

getUid()

public getUid() : string
Tags
since
1.5.0
Return values
string

isCompleted()

public isCompleted() : bool
Tags
since
1.5.0
Return values
bool

isFailed()

public isFailed() : bool
Tags
since
1.5.0
Return values
bool

isPending()

public isPending() : bool
Tags
since
1.5.0
Return values
bool

removeExpirationTime()

public removeExpirationTime() : mixed
Tags
since
1.5.0
Return values
mixed

resetExpirationTime()

Set the expiration time to current time + pending payment time.

public resetExpirationTime() : mixed
Tags
since
1.5.0
Return values
mixed

setExpirationTime()

public setExpirationTime(int $timestamp) : mixed
Parameters
$timestamp : int
Tags
since
1.5.0
Return values
mixed

setGatewayMode()

public setGatewayMode(mixed $gatewayMode[, mixed $save = false ]) : mixed
Parameters
$gatewayMode : mixed
$save : mixed = false
Return values
mixed

setPaymentMethod()

public setPaymentMethod(string $paymentMethod[, bool|mixed $save = false ]) : mixed
Parameters
$paymentMethod : string
$save : bool|mixed = false

Optional. Whether to update the post meta. False by default.

Tags
since
1.5.0
Return values
mixed

setTransactionId()

public setTransactionId(string $transactionId[, bool|mixed $save = false ]) : mixed
Parameters
$transactionId : string
$save : bool|mixed = false

Optional. Whether to update the post meta. False by default.

Tags
since
1.5.0
Return values
mixed

setupFields()

protected setupFields( $fieldValues) : mixed
Parameters
$fieldValues :
Tags
since
1.0
Return values
mixed

Search results