Function __global->escrow_points

Definitions

sources/points_escrow.php

  • Create a new points escrow between two members.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$sending_member MEMBER No No required parameter N/A N/A The member creating and putting the points into escrow; use guest for system-initiated escrows
$receiving_member ?MEMBER No No required parameter N/A N/A The member who will receive the points once the escrow conditions are met (null: virtually system because we do not know who will receive these points yet)
$amount integer No No required parameter N/A N/A The amount of points to escrow
$reason SHORT_TEXT No No required parameter N/A N/A The reason for escrow used in logs
$agreement LONG_TEXT No No required parameter N/A N/A The detailed terms and conditions for the escrow
$expiry_time ?TIME No No Null N/A N/A The time this escrow will automatically cancel or enter dispute if the terms are not met (null: do not automatically expire)
$content_type ID_TEXT No No Blank (empty string) N/A N/A The associated content type with this escrow (blank: none)
$content_id ID_TEXT No No Blank (empty string) N/A N/A The associated content ID with this escrow (blank: none)
$escrow_log boolean No No True N/A N/A Whether to log the escrow creation in its own log
$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

  • The ID of the escrow record (null: There was an error)
  • Type: ?AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Create a new points escrow between two members.
 *
 * @param  MEMBER $sending_member The member creating and putting the points into escrow; use guest for system-initiated escrows
 * @param  ?MEMBER $receiving_member The member who will receive the points once the escrow conditions are met (null: virtually system because we do not know who will receive these points yet)
 * @param  integer $amount The amount of points to escrow
 * @param  SHORT_TEXT $reason The reason for escrow used in logs
 * @param  LONG_TEXT $agreement The detailed terms and conditions for the escrow
 * @param  ?TIME $expiry_time The time this escrow will automatically cancel or enter dispute if the terms are not met (null: do not automatically expire)
 * @param  ID_TEXT $content_type The associated content type with this escrow (blank: none)
 * @param  ID_TEXT $content_id The associated content ID with this escrow (blank: none)
 * @param  boolean $escrow_log Whether to log the escrow creation in its own log
 * @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 ?AUTO_LINK The ID of the escrow record (null: There was an error)
 */

function escrow_points(int $sending_member, ?int $receiving_member, int $amount, string $reason, string $agreement, ?int $expiry_time = null, string $content_type = '', string $content_id = '', bool $escrow_log = true, ?bool $send_notifications = true) : ?int