Information
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.
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.
Information
setAmount (float $amount)
Set the amount for the transaction.
Information
setType (string $type)
Set the type of the transaction according to the gateway.
Examples include: charge
, refund
.
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.