/home/techb158/ileadtechnology.com/vendor/cartalyst/stripe/src
Edit: /home/techb158/ileadtechnology.com/vendor/cartalyst/stripe/src/Config.php (4251B)
setVersion($version);
$this->setApiKey($apiKey ?: self::getEnvVariable('STRIPE_API_KEY', ''));
$this->setApiVersion($apiVersion ?: self::getEnvVariable('STRIPE_API_VERSION', '2017-06-05'));
}
/**
* @param string $name
* @param string|null $default
*
* @return string|null
*/
private static function getEnvVariable($name, $default = null)
{
if (isset($_SERVER[$name])) {
return (string) $_SERVER[$name];
}
if (PHP_SAPI === 'cli' && ($value = getenv($name)) !== false) {
return (string) $value;
}
return $default;
}
/**
* {@inheritdoc}
*/
public function getVersion()
{
return $this->version;
}
/**
* {@inheritdoc}
*/
public function setVersion($version)
{
$this->version = $version;
return $this;
}
/**
* {@inheritdoc}
*/
public function getApiKey()
{
return $this->apiKey;
}
/**
* {@inheritdoc}
*/
public function setApiKey($apiKey)
{
$this->apiKey = $apiKey;
return $this;
}
/**
* {@inheritdoc}
*/
public function getApiVersion()
{
return $this->apiVersion;
}
/**
* {@inheritdoc}
*/
public function setApiVersion($apiVersion)
{
$this->apiVersion = $apiVersion;
return $this;
}
/**
* {@inheritdoc}
*/
public function getIdempotencyKey()
{
return $this->idempotencyKey;
}
/**
* {@inheritdoc}
*/
public function setIdempotencyKey($idempotencyKey)
{
$this->idempotencyKey = $idempotencyKey;
return $this;
}
/**
* Returns the managed account id.
*
* @return string|null
*/
public function getAccountId()
{
return $this->accountId;
}
/**
* Sets the managed account id.
*
* @param string|null $accountId
* @return $this
*/
public function setAccountId($accountId)
{
$this->accountId = $accountId;
return $this;
}
/**
* Returns the application's information.
*
* @return array|null
*/
public function getAppInfo()
{
return $this->appInfo;
}
/**
* Sets the application's information.
*
* @param string $appName
* @param string $appVersion
* @param string $appUrl
* @param string $appPartnerId
* @return $this
*/
public function setAppInfo($appName, $appVersion = null, $appUrl = null, $appPartnerId = null)
{
$this->appInfo = [
'name' => $appName,
'version' => $appVersion,
'url' => $appUrl,
'partner_id' => $appPartnerId,
];
return $this;
}
}