Esempio n. 1
0
 static function _createCard($account = null)
 {
     $card = self::$marketplace->createCard('123 Fake Street', 'Jollywood', null, '90210', 'khalkhalash', '4112344112344113', null, 12, 2013);
     if ($account != null) {
         $account->addCard($card);
         $card = Card::get($card->uri);
     }
     return $card;
 }
 /**
  * @param $uri
  * @return \Balanced\Card
  */
 public function getCard($uri)
 {
     return \Balanced\Card::get($uri);
 }
Esempio n. 3
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 \Balanced\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;
 }
 function testGetDeletedCard()
 {
     $card_href = $this->testDeleteCard();
     Card::get($card_href);
 }