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() -

Details

BelongsTo client ()

A transaction can belong to a client.

Return Value

BelongsTo

BelongsTo invoice ()

A transaction can belong to an invoice.

Return Value

BelongsTo

Builder scopeLookup (Builder $query, string $gateway, string $transactionId)

Perform a transaction lookup for a given gateway and transaction ID.

Parameters

Builder $query
string $gateway
string $transactionId

Return Value

Builder

Gateway|null gateway ()

Load the transaction's gateway module, if known to the transaction.

Return Value

Gateway|null

Exceptions

Fatal

Gateway|null gatewaySafe ()

Load the transaction's gateway module in a fail-silent manner.

Return Value

Gateway|null

bool gatewaySupports (string $feature)

Determine if this transaction's gateway supports the requested feature. False will be returned for a failing or inactive gateway.

Parameters

string $feature The feature to check for

Return Value

bool

See also

Gateway::functionExists()

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.

Parameters

mixed $default The value to return if the gateway or feature is not available.
string $feature The gateway's feature to call.
array $params The parameters required by the gateway feature.

Return Value

mixed

string|null getFormattedTransactionIdAttribute ()

Retrieve the transaction after formatting.

Return Value

string|null

string getTransactionIdMarkup ()

Return Value

string Return the transaction ID including possible markup for consistent decoration.

Return Value

string