Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Config.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Signifyd\Model;
7 
10 
16 class Config
17 {
21  private $scopeConfig;
22 
28  public function __construct(ScopeConfigInterface $scopeConfig)
29  {
30  $this->scopeConfig = $scopeConfig;
31  }
32 
40  public function isActive($storeId = null): bool
41  {
42  $enabled = $this->scopeConfig->isSetFlag(
43  'fraud_protection/signifyd/active',
45  $storeId
46  );
47  return $enabled;
48  }
49 
59  public function getApiKey($storeId = null): string
60  {
61  $apiKey = $this->scopeConfig->getValue(
62  'fraud_protection/signifyd/api_key',
64  $storeId
65  );
66  return $apiKey;
67  }
68 
76  public function getApiUrl($storeId = null): string
77  {
78  $apiUrl = $this->scopeConfig->getValue(
79  'fraud_protection/signifyd/api_url',
81  $storeId
82  );
83  return $apiUrl;
84  }
85 
92  public function isDebugModeEnabled($storeId = null): bool
93  {
94  $debugModeEnabled = $this->scopeConfig->isSetFlag(
95  'fraud_protection/signifyd/debug',
97  $storeId
98  );
99  return $debugModeEnabled;
100  }
101 }
__construct(ScopeConfigInterface $scopeConfig)
Definition: Config.php:28
isDebugModeEnabled($storeId=null)
Definition: Config.php:92
getApiUrl($storeId=null)
Definition: Config.php:76
isActive($storeId=null)
Definition: Config.php:40
getApiKey($storeId=null)
Definition: Config.php:59