Function __global->build_transaction_linker
Definitions
sources/ecommerce.php
- Build a transaction linker. Will link to a transaction if there is access, or show a tooltip of details.Used by the sales and order logs.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $txn_id | ID_TEXT | No | No | required parameter | N/A | N/A | Transaction ID |
| $awaiting_payment | boolean | No | No | required parameter | N/A | N/A | If payment is still required |
| $transaction_row | ?array | No | No | Null | N/A | N/A | The transaction database row (null: look it up) |
| $missing_ok | boolean | No | No | False | N/A | N/A | Whether to return null instead of throwing an error if the transaction was not found |
Returns
- The linker (null: Transaction not found and $missing_ok was set to true)
- Type: ?Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Build a transaction linker. Will link to a transaction if there is access, or show a tooltip of details.Used by the sales and order logs.
*
* @param ID_TEXT $txn_id Transaction ID
* @param boolean $awaiting_payment If payment is still required
* @param ?array $transaction_row The transaction database row (null: look it up)
* @param boolean $missing_ok Whether to return null instead of throwing an error if the transaction was not found
* @return ?Tempcode The linker (null: Transaction not found and $missing_ok was set to true)
*/
function build_transaction_linker(string $txn_id, bool $awaiting_payment, ?array $transaction_row = null, bool $missing_ok = false) : ?object
* Build a transaction linker. Will link to a transaction if there is access, or show a tooltip of details.Used by the sales and order logs.
*
* @param ID_TEXT $txn_id Transaction ID
* @param boolean $awaiting_payment If payment is still required
* @param ?array $transaction_row The transaction database row (null: look it up)
* @param boolean $missing_ok Whether to return null instead of throwing an error if the transaction was not found
* @return ?Tempcode The linker (null: Transaction not found and $missing_ok was set to true)
*/
function build_transaction_linker(string $txn_id, bool $awaiting_payment, ?array $transaction_row = null, bool $missing_ok = false) : ?object

