Function __global->satisfy_escrow

Definitions

sources/points_escrow.php

  • Mark an escrow as satisfied by a member. Also completes the escrow if both members satisfied.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$id AUTO_LINK No No required parameter N/A N/A The ID of the escrow to satisfy
$member_id MEMBER No No required parameter N/A N/A The member who is satisfying it
$row ?array No No Null N/A N/A If the escrow was already queried from the database, this is the row (null: query for 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)] (null: the escrow was not yet fully satisfied by all members)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Mark an escrow as satisfied by a member. Also completes the escrow if both members satisfied.
 *
 * @param  AUTO_LINK $id The ID of the escrow to satisfy
 * @param  MEMBER $member_id The member who is satisfying it
 * @param  ?array $row If the escrow was already queried from the database, this is the row (null: query for 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)] (null: the escrow was not yet fully satisfied by all members)
 */

function satisfy_escrow(int $id, int $member_id, ?array $row = null, bool $escrow_log = true, ?bool $send_notifications = true) : ?array