當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Stripe_Customer::all方法代碼示例

本文整理匯總了PHP中Stripe_Customer::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Stripe_Customer::all方法的具體用法?PHP Stripe_Customer::all怎麽用?PHP Stripe_Customer::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Stripe_Customer的用法示例。


在下文中一共展示了Stripe_Customer::all方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_all

 /**
  * 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;
     }
 }
開發者ID:ruchirkakkad,項目名稱:stripe-integration-as-models,代碼行數:18,代碼來源:stripe_cust.php

示例2: getCustomers

 /**
  * 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;
     }
 }
開發者ID:Daltonmedia,項目名稱:stripe,代碼行數:18,代碼來源:StripeClient.php


注:本文中的Stripe_Customer::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。