Function __global->cancel_escrow

Definitions

sources/points_escrow.php

  • Cancel an escrow, refunding the points and sending out a notification.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

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 cancel
$member_id MEMBER No No required parameter N/A N/A The member cancelling the escrow (use guest for system)
$reason LONG_TEXT No No required parameter N/A N/A The explanation for cancelling the escrow
$row ?array No No Null N/A N/A The database row for the escrow (null: query for it)
$actually_refund boolean No No True N/A N/A Whether to actually refund the points to the sender (this should be false if the original points transaction is being reversed)

Returns

  • The ID of the points_ledger transaction refunding the points to the sender (null: no refund was processed)
  • Type: ?AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Cancel an escrow, refunding the points and sending out a notification.
 *
 * @param  AUTO_LINK $id The ID of the escrow to cancel
 * @param  MEMBER $member_id The member cancelling the escrow (use guest for system)
 * @param  LONG_TEXT $reason The explanation for cancelling the escrow
 * @param  ?array $row The database row for the escrow (null: query for it)
 * @param  boolean $actually_refund Whether to actually refund the points to the sender (this should be false if the original points transaction is being reversed)
 * @return ?AUTO_LINK The ID of the points_ledger transaction refunding the points to the sender (null: no refund was processed)
 */

function cancel_escrow(int $id, int $member_id, string $reason, ?array $row = null, bool $actually_refund = true) : ?int