コード例 #1
0
 /**
  * Create a buyer account.
  *
  * @param string email_address Optional email address. There can only be one account with this email address.
  * @param string card_href Href referencing a card to associate with the account.
  * @param array[string]string meta Optional metadata to associate with the account.
  * @param string name Optional name of the account.
  *
  * @return \infiniteLabs\BalancedPayments\Customer
  */
 public function createBuyer($email_address, $card_href, $meta = null, $name = null)
 {
     $customer = $this->customers->create(array('email' => $email_address, 'meta' => $meta, 'name' => $name));
     $card = Card::get($card_href);
     $card->associateToCustomer($customer);
     return $customer;
 }