Function __global->points_refund
Definitions
sources/points2.php
- Refund points from one member to another. This uses gift points where possible and if enabled.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: int
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$sending_member | MEMBER | required parameter | N/A | N/A | The ID of the member refunding the points (e.g. the receiving_member in the original transaction) |
$receiving_member | MEMBER | required parameter | N/A | N/A | The ID of the member receiving the refunded points (e.g. the sending_member in the original transaction) |
$reason | SHORT_TEXT | required parameter | N/A | N/A | The reason for this refund in the logs |
$total_points | integer | required parameter | N/A | N/A | The total number of points to refund (includes gift points when applicable) |
$amount_gift_points | integer | 0 | N/A | N/A | The number of $total_points which should be refunded as gift points (subtracted from gift_points_sent) |
$anonymous | BINARY | 0 | N/A | N/A | Whether the sender should be hidden from those without the privilege to trace anonymous transactions |
$linked_ledger | ?array | Null | N/A | N/A | The database row of the points_ledger transaction being refunded by this (null: this refund is not related to any past ledger) |
$send_notifications | ?boolean | True | N/A | N/A | Whether to send notifications for this transaction (false: only the staff get it) (true: both the member and staff get it) (null: neither the member nor staff get it) |
$t_type | ID_TEXT | Blank (empty string) | N/A | N/A | An identifier to relate this transaction with other transactions of the same $type (e.g. content type) |
$t_subtype | ID_TEXT | Blank (empty string) | N/A | N/A | An identifier to relate this transaction with other transactions of the same $type and $subtype (e.g. an action performed on the $type) |
$t_type_id | ID_TEXT | Blank (empty string) | N/A | N/A | Some content or row ID of the specified $type |
$time | ?TIME | Null | N/A | N/A | The time this transaction occurred (null: now) |
$status | integer | 3 | N/A | N/A | The status to use for the record (see LEDGER_STATUS_*) |
Return
- The ID of the transaction (null: a transaction was not created)
- Type: ?AUTO_LINK
- Set: N/A
- Range: N/A