[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/externals/balanced-php/src/Balanced/ -> Hold.php (summary)

(no description)

File Size: 77 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Hold:: (3 methods):
  init()
  void()
  capture()


Class: Hold  - X-Ref

Represents pending debit of funds for an account. The funds for that debit
are held by the processor. You can later capture the hold, which results in
debit, or void it, which releases the held funds.

Note that a hold can expire so you should always check
Balanced\Hold::expires_at.

You create these using \Balanced\Account::hold.

<code>
$marketplace = \Balanced\Marketplace::mine();

$account = $marketplace
->accounts
->query()
->filter(Account::f->email_address->eq('[email protected]'))
->one();

$hold = $account->hold(
100,
'a description',
null,
array(
'my_id': '1293712837'
)
);

$debit = $hold->capture();
</code>
init()   X-Ref
No description

void()   X-Ref
Voids a pending hold. This releases the held funds. Once voided a hold
is not longer pending can cannot be re-captured or re-voided.

return: \Balanced\Hold

capture($amount = null)   X-Ref
Captures a pending hold. This results in a debit. Once captured a hold
is not longer pending can cannot be re-captured or re-voided.

param: int amount Optional Portion of the pending hold to capture. If not specified the full amount associated with the hold is captured.
return: \Balanced\Debit



Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1