/**
  * Get last (n) charges up to 100 (default).  Cannot return more than 100 at a time.   Data
  * returned is sorted with most recent first.
  *
  * @return array - function returns associative array from stripe, we cant get objects
  */
 public function get_all($num_customers = 100, $offset = 0)
 {
     try {
         $ch = Stripe_Customer::all(array('count' => $num_customers, 'offset' => $offset));
         return $ch;
     } catch (Exception $e) {
         $this->error = TRUE;
         $this->message = $e->getMessage();
         $this->code = $e->getCode();
         return FALSE;
     }
 }
示例#2
0
 /**
  * Get all customers
  * @param string $limit				Number of customers to retrieve
  * @param string $ending_before		ID of the first element in the previous list
  * @param string $starting_after	ID of the last element in the previous list
  * @param mixed $created			Created hash
  * @return array|false
  */
 public function getCustomers($limit = 10, $ending_before = null, $starting_after = null, $created = null)
 {
     try {
         $params = array_filter(array('limit' => $limit, 'ending_before' => $ending_before, 'starting_after' => $starting_after, 'created' => $created));
         return Stripe_Customer::all($params, $this->access_token);
     } catch (Exception $ex) {
         $this->log($ex);
         return false;
     }
 }