PPPStripeStripe

Class Stripe.

Defined (1)

The class is defined in the following location(s).

/includes/api/stripe-php/lib/Stripe.php  
  1. class Stripe 
  2. // @var string The Stripe API key to be used for requests. 
  3. public static $apiKey; 
  4.  
  5. // @var string The base URL for the Stripe API. 
  6. public static $apiBase = 'https://api.stripe.com'; 
  7.  
  8. // @var string The base URL for the Stripe API uploads endpoint. 
  9. public static $apiUploadBase = 'https://uploads.stripe.com'; 
  10.  
  11. // @var string|null The version of the Stripe API to use for requests. 
  12. public static $apiVersion = null; 
  13.  
  14. // @var string|null The account ID for connected accounts requests. 
  15. public static $accountId = null; 
  16.  
  17. // @var boolean Defaults to true. 
  18. public static $verifySslCerts = true; 
  19.  
  20. // @var array The application's information (name, version, URL) 
  21. public static $appInfo = null; 
  22.  
  23. const VERSION = '4.0.1'; 
  24.  
  25. /** 
  26. * @return string The API key used for requests. 
  27. */ 
  28. public static function getApiKey() 
  29. return self::$apiKey; 
  30.  
  31. /** 
  32. * Sets the API key to be used for requests. 
  33. * @param string $apiKey 
  34. */ 
  35. public static function setApiKey($apiKey) 
  36. self::$apiKey = $apiKey; 
  37.  
  38. /** 
  39. * @return string The API version used for requests. null if we're using the 
  40. * latest version. 
  41. */ 
  42. public static function getApiVersion() 
  43. return self::$apiVersion; 
  44.  
  45. /** 
  46. * @param string $apiVersion The API version to use for requests. 
  47. */ 
  48. public static function setApiVersion($apiVersion) 
  49. self::$apiVersion = $apiVersion; 
  50.  
  51. /** 
  52. * @return boolean 
  53. */ 
  54. public static function getVerifySslCerts() 
  55. return self::$verifySslCerts; 
  56.  
  57. /** 
  58. * @param boolean $verify 
  59. */ 
  60. public static function setVerifySslCerts($verify) 
  61. self::$verifySslCerts = $verify; 
  62.  
  63. /** 
  64. * @return string | null The Stripe account ID for connected account 
  65. * requests. 
  66. */ 
  67. public static function getAccountId() 
  68. return self::$accountId; 
  69.  
  70. /** 
  71. * @param string $accountId The Stripe account ID to set for connected 
  72. * account requests. 
  73. */ 
  74. public static function setAccountId($accountId) 
  75. self::$accountId = $accountId; 
  76.  
  77. /** 
  78. * @return array | null The application's information 
  79. */ 
  80. public static function getAppInfo() 
  81. return self::$appInfo; 
  82.  
  83. /** 
  84. * @param string $appName The application's name 
  85. * @param string $appVersion The application's version 
  86. * @param string $appUrl The application's URL 
  87. */ 
  88. public static function setAppInfo($appName, $appVersion = null, $appUrl = null) 
  89. if (self::$appInfo === null) { 
  90. self::$appInfo = array(); 
  91. self::$appInfo['name'] = $appName; 
  92. self::$appInfo['version'] = $appVersion; 
  93. self::$appInfo['url'] = $appUrl;