The information class is used to provide additional data for a transaction from a gateway module.

All set methods can be chained and are optional. We recommend that the transaction id, amount and currency be set as a minimum.

class Information implements Arrayable

Properties summary

Type Property Description
protected $transactionId
protected $amount
protected $type
protected $currency
protected $description
protected $fee
protected $status
protected $exchangeRate
protected null|Carbon $created
protected null|Carbon $availableOn
protected $additionalData

Methods summary

Return Type Method Name Description
Information setTransactionId(string $transactionId) Set the transaction id.
Information setAmount(float $amount) Set the amount for the transaction.
Information setType(string $type) Set the type of the transaction according to the gateway.
Information setCurrency(string $currency) Set the currency code of the transaction.
Information setDescription(string $description) Set a description for the transaction.
Information setFee(float $fee) Set the fee for the transaction.
Information setStatus(string $status) Set the transaction status.
Information setExchangeRate(float $exchangeRate) Set the exchange rate for the transaction.
Information setCreated(Carbon $created) Set the date that the transaction was created.
Information setAvailableOn(Carbon $availableOn) Set the date that the transaction will be available on.
Information setAdditionalData(array $additionalData) Set an array of additional data to be displayed on the transaction information modal.
Information setAdditionalDatum(string $key, string|float $value) Set a single additional datum to be displayed on the information modal.
array toArray() Obtain all the data provided to the Information class in an array format. Used in the product to populate the modal data.
string getTransactionId() -
float getAmount() -
string|null getType() -
string|null getCurrency() -
string|null getDescription() -
string|null getStatus() -
float|null getExchangeRate() -
string|null getCreated() -
string|null getAvailableOn() -
float getFee() -
array getAdditionalData() -

Details

Information setTransactionId (string $transactionId)

Set the transaction id.

Parameters

string $transactionId

Return Value

Information

Information setAmount (float $amount)

Set the amount for the transaction.

Parameters

float $amount

Return Value

Information

Information setType (string $type)

Set the type of the transaction according to the gateway.

Examples include: charge, refund.

Parameters

string $type

Return Value

Information

Information setCurrency (string $currency)

Set the currency code of the transaction.

Parameters

string $currency

Return Value

Information

Information setDescription (string $description)

Set a description for the transaction.

Parameters

string $description

Return Value

Information

Information setFee (float $fee)

Set the fee for the transaction.

Parameters

float $fee

Return Value

Information

Information setStatus (string $status)

Set the transaction status.

Parameters

string $status

Return Value

Information

Information setExchangeRate (float $exchangeRate)

Set the exchange rate for the transaction.

Parameters

float $exchangeRate

Return Value

Information

Information setCreated (Carbon $created)

Set the date that the transaction was created.

Parameters

Carbon $created

Return Value

Information

Information setAvailableOn (Carbon $availableOn)

Set the date that the transaction will be available on.

Parameters

Carbon $availableOn

Return Value

Information

Information setAdditionalData (array $additionalData)

Set an array of additional data to be displayed on the transaction information modal.

Parameters

array $additionalData

Return Value

Information

Information setAdditionalDatum (string $key, string|float $value)

Set a single additional datum to be displayed on the information modal.

Parameters

string $key
string|float $value

Return Value

Information

array toArray ()

Obtain all the data provided to the Information class in an array format. Used in the product to populate the modal data.

Return Value

array

protected string getTransactionId ()

Return Value

string

protected float getAmount ()

Return Value

float

protected string|null getType ()

Return Value

string|null

protected string|null getCurrency ()

Return Value

string|null

protected string|null getDescription ()

Return Value

string|null

protected string|null getStatus ()

Return Value

string|null

protected float|null getExchangeRate ()

Return Value

float|null

protected string|null getCreated ()

Return Value

string|null

protected string|null getAvailableOn ()

Return Value

string|null

protected float getFee ()

Return Value

float

protected array getAdditionalData ()

Return Value

array