Skip to content

Commit 90ca708

Browse files
committed
MC-13775: [2.2.x] Accept.js for Auth.net
- Fix static tests
1 parent c384b27 commit 90ca708

File tree

1 file changed

+15
-23
lines changed
  • app/code/Magento/AuthorizenetAcceptjs/Gateway

1 file changed

+15
-23
lines changed

app/code/Magento/AuthorizenetAcceptjs/Gateway/Config.php

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
namespace Magento\AuthorizenetAcceptjs\Gateway;
1010

11-
use Magento\AuthorizenetAcceptjs\Model\Adminhtml\Source\Environment;
12-
use Magento\Framework\App\Config\ScopeConfigInterface;
13-
1411
/**
1512
* Houses configuration for this gateway
1613
*/
@@ -91,11 +88,6 @@ class Config extends \Magento\Payment\Gateway\Config\Config
9188
*/
9289
private static $solutionIdProduction = 'AAA175350';
9390

94-
/**
95-
* @var string
96-
*/
97-
private static $environmentSandbox = 'sandbox';
98-
9991
/**
10092
* Gets the login id
10193
*
@@ -104,7 +96,7 @@ class Config extends \Magento\Payment\Gateway\Config\Config
10496
*/
10597
public function getLoginId($storeId = null)
10698
{
107-
return $this->getValue(Config::$keyLoginId, $storeId);
99+
return $this->getValue(self::$keyLoginId, $storeId);
108100
}
109101

110102
/**
@@ -115,7 +107,7 @@ public function getLoginId($storeId = null)
115107
*/
116108
public function getEnvironment($storeId = null): string
117109
{
118-
return $this->getValue(Config::$keyEnvironment, $storeId);
110+
return $this->getValue(self::$keyEnvironment, $storeId);
119111
}
120112

121113
/**
@@ -126,7 +118,7 @@ public function getEnvironment($storeId = null): string
126118
*/
127119
public function getTransactionKey($storeId = null)
128120
{
129-
return $this->getValue(Config::$keyTransactionKey, $storeId);
121+
return $this->getValue(self::$keyTransactionKey, $storeId);
130122
}
131123

132124
/**
@@ -137,9 +129,9 @@ public function getTransactionKey($storeId = null)
137129
*/
138130
public function getApiUrl($storeId = null): string
139131
{
140-
$environment = $this->getValue(Config::$keyEnvironment, $storeId);
132+
$environment = $this->getValue(self::$keyEnvironment, $storeId);
141133

142-
return $environment === self::$environmentSandbox
134+
return $environment === 'sandbox'
143135
? self::$endpointUrlSandbox
144136
: self::$endpointUrlProduction;
145137
}
@@ -152,7 +144,7 @@ public function getApiUrl($storeId = null): string
152144
*/
153145
public function getTransactionSignatureKey($storeId = null)
154146
{
155-
return $this->getValue(Config::$keySignatureKey, $storeId);
147+
return $this->getValue(self::$keySignatureKey, $storeId);
156148
}
157149

158150
/**
@@ -163,7 +155,7 @@ public function getTransactionSignatureKey($storeId = null)
163155
*/
164156
public function getLegacyTransactionHash($storeId = null)
165157
{
166-
return $this->getValue(Config::$keyLegacyTransactionHash, $storeId);
158+
return $this->getValue(self::$keyLegacyTransactionHash, $storeId);
167159
}
168160

169161
/**
@@ -174,7 +166,7 @@ public function getLegacyTransactionHash($storeId = null)
174166
*/
175167
public function getPaymentAction($storeId = null)
176168
{
177-
return $this->getValue(Config::$keyPaymentAction, $storeId);
169+
return $this->getValue(self::$keyPaymentAction, $storeId);
178170
}
179171

180172
/**
@@ -185,7 +177,7 @@ public function getPaymentAction($storeId = null)
185177
*/
186178
public function getClientKey($storeId = null)
187179
{
188-
return $this->getValue(Config::$keyClientKey, $storeId);
180+
return $this->getValue(self::$keyClientKey, $storeId);
189181
}
190182

191183
/**
@@ -196,7 +188,7 @@ public function getClientKey($storeId = null)
196188
*/
197189
public function shouldEmailCustomer($storeId = null): bool
198190
{
199-
return (bool)$this->getValue(Config::$keyShouldEmailCustomer, $storeId);
191+
return (bool)$this->getValue(self::$keyShouldEmailCustomer, $storeId);
200192
}
201193

202194
/**
@@ -207,7 +199,7 @@ public function shouldEmailCustomer($storeId = null): bool
207199
*/
208200
public function isCvvEnabled($storeId = null): bool
209201
{
210-
return (bool)$this->getValue(Config::$keyCvvEnabled, $storeId);
202+
return (bool)$this->getValue(self::$keyCvvEnabled, $storeId);
211203
}
212204

213205
/**
@@ -218,9 +210,9 @@ public function isCvvEnabled($storeId = null): bool
218210
*/
219211
public function getSolutionId($storeId = null)
220212
{
221-
$environment = $this->getValue(Config::$keyEnvironment, $storeId);
213+
$environment = $this->getValue(self::$keyEnvironment, $storeId);
222214

223-
return $environment === self::$environmentSandbox
215+
return $environment === 'sandbox'
224216
? self::$solutionIdSandbox
225217
: self::$solutionIdProduction;
226218
}
@@ -233,7 +225,7 @@ public function getSolutionId($storeId = null)
233225
*/
234226
public function getAdditionalInfoKeys($storeId = null): array
235227
{
236-
return explode(',', $this->getValue(Config::$keyAdditionalInfoKeys, $storeId) ?? '');
228+
return explode(',', $this->getValue(self::$keyAdditionalInfoKeys, $storeId) ?? '');
237229
}
238230

239231
/**
@@ -244,6 +236,6 @@ public function getAdditionalInfoKeys($storeId = null): array
244236
*/
245237
public function getTransactionInfoSyncKeys($storeId = null): array
246238
{
247-
return explode(',', $this->getValue(Config::$keyTransactionSyncKeys, $storeId) ?? '');
239+
return explode(',', $this->getValue(self::$keyTransactionSyncKeys, $storeId) ?? '');
248240
}
249241
}

0 commit comments

Comments
 (0)