social_auth_vipps-8.x-2.1/src/Settings/VippsAuthSettings.php
src/Settings/VippsAuthSettings.php
<?php
namespace Drupal\social_auth_vipps\Settings;
use Drupal\social_api\Settings\SettingsBase;
/**
* Defines methods to get Social Auth Vipps settings.
*/
class VippsAuthSettings extends SettingsBase implements VippsAuthSettingsInterface {
/**
* Client ID.
*
* @var string
*/
protected $clientId;
/**
* Client secret.
*
* @var string
*/
protected $clientSecret;
/**
* Merchant Serial Number.
*
* @var string
*/
protected $merchantSerialNumber;
/**
* Subscription Key.
*
* @var string
*/
protected $subscriptionKey;
/**
* {@inheritdoc}
*/
public function getClientId() {
if (!$this->clientId) {
$this->clientId = $this->config->get('client_id');
}
return $this->clientId;
}
/**
* {@inheritdoc}
*/
public function getClientSecret() {
if (!$this->clientSecret) {
$this->clientSecret = $this->config->get('client_secret');
}
return $this->clientSecret;
}
/**
* {@inheritdoc}
*/
public function getMerchantSerialNumber() {
if (!$this->merchantSerialNumber) {
$this->merchantSerialNumber = $this->config->get('merchant_serial_number');
}
return $this->merchantSerialNumber;
}
/**
* {@inheritdoc}
*/
public function getSubscriptionKey() {
if (!$this->subscriptionKey) {
$this->subscriptionKey = $this->config->get('subscription_key');
}
return $this->subscriptionKey;
}
}
