Transaction
class
Transaction extends AbstractModel
Properties summary
| Type | Property | Description | |
|---|---|---|---|
| protected | $table | ||
| protected | $dates | ||
| protected | $appends | ||
| protected | $columnMap | ||
| $timestamps |
Methods summary
| Return Type | Method Name | Description | |
|---|---|---|---|
| BelongsTo | client() | A transaction can belong to a client. | |
| BelongsTo | invoice() | A transaction can belong to an invoice. | |
| Builder | scopeLookup(Builder $query, string $gateway, string $transactionId) | Perform a transaction lookup for a given gateway and transaction ID. | |
| Gateway|null | gateway() | Load the transaction's gateway module, if known to the transaction. | |
| Gateway|null | gatewaySafe() | Load the transaction's gateway module in a fail-silent manner. | |
| bool | gatewaySupports(string $feature) | Determine if this transaction's gateway supports the requested feature. False will be returned for a failing or inactive gateway. | |
| mixed | gatewayCallIfSupports(mixed $default, string $feature, array $params = []) | Call and return the result of the specified gateway feature of this transaction's gateway, if the gateway and the feature is available; otherwise return the $default value. | |
| string|null | getFormattedTransactionIdAttribute() | Retrieve the transaction after formatting. | |
| string | getTransactionIdMarkup() | - | |
| string | getLink() | - | |
| static bool | isUnique(string $gateway, string $transactionId) | - | |
| static void | assertUnique(string $gateway, string $transactionId) | - |
Details
BelongsTo
client ()
A transaction can belong to a client.
BelongsTo
invoice ()
A transaction can belong to an invoice.
Builder
scopeLookup (Builder $query, string $gateway, string $transactionId)
Perform a transaction lookup for a given gateway and transaction ID.
Gateway|null
gateway ()
Load the transaction's gateway module, if known to the transaction.
Gateway|null
gatewaySafe ()
Load the transaction's gateway module in a fail-silent manner.
bool
gatewaySupports (string $feature)
Determine if this transaction's gateway supports the requested feature. False will be returned for a failing or inactive gateway.
mixed
gatewayCallIfSupports (mixed $default, string $feature, array $params = [])
Call and return the result of the specified gateway feature of this transaction's gateway, if the gateway and the feature is available; otherwise return the $default value.
string|null
getFormattedTransactionIdAttribute ()
Retrieve the transaction after formatting.