Function __global->_complete_escrow

Definitions

sources/points_escrow.php

  • The actualiser for completing an escrow and crediting the points to the recipient. Also returns points to the sender if we are not crediting the full amount.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$row array No No required parameter N/A N/A The database row for the escrow to mark complete
$amount ?integer No No Null N/A N/A The number of points to credit to the recipient; the rest will be refunded to the sender (null: credit the full amount from the escrow)
$escrow_log boolean No No True N/A N/A Whether to log this in the escrow logs
$send_notifications ?boolean No No 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)

Returns

  • Tuple [integer ID of the recipient ledger, ?integer ID of the ledger refunding the sender (null means no refund processed), ?integer total points refunded (null means no refund), ?integer number of refunded points that were gift points (null means no refund)]
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * The actualiser for completing an escrow and crediting the points to the recipient. Also returns points to the sender if we are not crediting the full amount.
 *
 * @param  array $row The database row for the escrow to mark complete
 * @param  ?integer $amount The number of points to credit to the recipient; the rest will be refunded to the sender (null: credit the full amount from the escrow)
 * @param  boolean $escrow_log Whether to log this in the escrow logs
 * @param  ?boolean $send_notifications 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)
 * @return array Tuple [integer ID of the recipient ledger, ?integer ID of the ledger refunding the sender (null means no refund processed), ?integer total points refunded (null means no refund), ?integer number of refunded points that were gift points (null means no refund)]
 */

function _complete_escrow(array $row, ?int $amount = null, bool $escrow_log = true, ?bool $send_notifications = true) : array