Example #1
0
 /**
  * Constructor.
  *
  * @param  string  $version
  * @param  string  $apiKey
  * @param  string  $apiVersion
  * @return void
  * @throws \RuntimeException
  */
 public function __construct($version, $apiKey, $apiVersion)
 {
     $api_key = $apiKey ?: getenv('STRIPE_API_KEY');
     $api_version = $apiVersion ?: getenv('STRIPE_API_VERSION') ?: '2015-03-24';
     if (!$api_key) {
         throw new \RuntimeException('The Stripe API key is not defined!');
     }
     parent::__construct(compact('version', 'api_key', 'api_version'));
 }