Пример #1
0
 /**
  * Credit an unstored bank account.
  *
  * @param int amount Amount to credit in USD pennies.
  * @param mixed bank_account Associative array describing a bank account to credit. The bank account will *not* be stored.
  * @param string description Optional description of the credit.
  *
  * @return \infiniteLabs\BalancedPayments\Credit
  *
  * <code>
  * $bank_account_info = array(
  *   "account_number" => "9900000001",
  *   "name" => "Johann Bernoulli",
  *   "routing_number" => "121000358",
  *   "type" => "checking",
  * );
  * $credit = infiniteLabs\BalancedPayments\Credit::bankAccount(
  *   10000,
  *   $bank_account_info
  * );
  * </code>
  */
 public static function bankAccount($amount, $bank_account, $description = null)
 {
     $credit = new Credit(array('amount' => $amount, 'destination' => $bank_account, 'description' => $description));
     $credit->save();
     return $credit;
 }