8
8
9
9
namespace Magento \AuthorizenetAcceptjs \Gateway ;
10
10
11
- use Magento \AuthorizenetAcceptjs \Model \Adminhtml \Source \Environment ;
12
- use Magento \Framework \App \Config \ScopeConfigInterface ;
13
-
14
11
/**
15
12
* Houses configuration for this gateway
16
13
*/
@@ -91,11 +88,6 @@ class Config extends \Magento\Payment\Gateway\Config\Config
91
88
*/
92
89
private static $ solutionIdProduction = 'AAA175350 ' ;
93
90
94
- /**
95
- * @var string
96
- */
97
- private static $ environmentSandbox = 'sandbox ' ;
98
-
99
91
/**
100
92
* Gets the login id
101
93
*
@@ -104,7 +96,7 @@ class Config extends \Magento\Payment\Gateway\Config\Config
104
96
*/
105
97
public function getLoginId ($ storeId = null )
106
98
{
107
- return $ this ->getValue (Config ::$ keyLoginId , $ storeId );
99
+ return $ this ->getValue (self ::$ keyLoginId , $ storeId );
108
100
}
109
101
110
102
/**
@@ -115,7 +107,7 @@ public function getLoginId($storeId = null)
115
107
*/
116
108
public function getEnvironment ($ storeId = null ): string
117
109
{
118
- return $ this ->getValue (Config ::$ keyEnvironment , $ storeId );
110
+ return $ this ->getValue (self ::$ keyEnvironment , $ storeId );
119
111
}
120
112
121
113
/**
@@ -126,7 +118,7 @@ public function getEnvironment($storeId = null): string
126
118
*/
127
119
public function getTransactionKey ($ storeId = null )
128
120
{
129
- return $ this ->getValue (Config ::$ keyTransactionKey , $ storeId );
121
+ return $ this ->getValue (self ::$ keyTransactionKey , $ storeId );
130
122
}
131
123
132
124
/**
@@ -137,9 +129,9 @@ public function getTransactionKey($storeId = null)
137
129
*/
138
130
public function getApiUrl ($ storeId = null ): string
139
131
{
140
- $ environment = $ this ->getValue (Config ::$ keyEnvironment , $ storeId );
132
+ $ environment = $ this ->getValue (self ::$ keyEnvironment , $ storeId );
141
133
142
- return $ environment === self :: $ environmentSandbox
134
+ return $ environment === ' sandbox '
143
135
? self ::$ endpointUrlSandbox
144
136
: self ::$ endpointUrlProduction ;
145
137
}
@@ -152,7 +144,7 @@ public function getApiUrl($storeId = null): string
152
144
*/
153
145
public function getTransactionSignatureKey ($ storeId = null )
154
146
{
155
- return $ this ->getValue (Config ::$ keySignatureKey , $ storeId );
147
+ return $ this ->getValue (self ::$ keySignatureKey , $ storeId );
156
148
}
157
149
158
150
/**
@@ -163,7 +155,7 @@ public function getTransactionSignatureKey($storeId = null)
163
155
*/
164
156
public function getLegacyTransactionHash ($ storeId = null )
165
157
{
166
- return $ this ->getValue (Config ::$ keyLegacyTransactionHash , $ storeId );
158
+ return $ this ->getValue (self ::$ keyLegacyTransactionHash , $ storeId );
167
159
}
168
160
169
161
/**
@@ -174,7 +166,7 @@ public function getLegacyTransactionHash($storeId = null)
174
166
*/
175
167
public function getPaymentAction ($ storeId = null )
176
168
{
177
- return $ this ->getValue (Config ::$ keyPaymentAction , $ storeId );
169
+ return $ this ->getValue (self ::$ keyPaymentAction , $ storeId );
178
170
}
179
171
180
172
/**
@@ -185,7 +177,7 @@ public function getPaymentAction($storeId = null)
185
177
*/
186
178
public function getClientKey ($ storeId = null )
187
179
{
188
- return $ this ->getValue (Config ::$ keyClientKey , $ storeId );
180
+ return $ this ->getValue (self ::$ keyClientKey , $ storeId );
189
181
}
190
182
191
183
/**
@@ -196,7 +188,7 @@ public function getClientKey($storeId = null)
196
188
*/
197
189
public function shouldEmailCustomer ($ storeId = null ): bool
198
190
{
199
- return (bool )$ this ->getValue (Config ::$ keyShouldEmailCustomer , $ storeId );
191
+ return (bool )$ this ->getValue (self ::$ keyShouldEmailCustomer , $ storeId );
200
192
}
201
193
202
194
/**
@@ -207,7 +199,7 @@ public function shouldEmailCustomer($storeId = null): bool
207
199
*/
208
200
public function isCvvEnabled ($ storeId = null ): bool
209
201
{
210
- return (bool )$ this ->getValue (Config ::$ keyCvvEnabled , $ storeId );
202
+ return (bool )$ this ->getValue (self ::$ keyCvvEnabled , $ storeId );
211
203
}
212
204
213
205
/**
@@ -218,9 +210,9 @@ public function isCvvEnabled($storeId = null): bool
218
210
*/
219
211
public function getSolutionId ($ storeId = null )
220
212
{
221
- $ environment = $ this ->getValue (Config ::$ keyEnvironment , $ storeId );
213
+ $ environment = $ this ->getValue (self ::$ keyEnvironment , $ storeId );
222
214
223
- return $ environment === self :: $ environmentSandbox
215
+ return $ environment === ' sandbox '
224
216
? self ::$ solutionIdSandbox
225
217
: self ::$ solutionIdProduction ;
226
218
}
@@ -233,7 +225,7 @@ public function getSolutionId($storeId = null)
233
225
*/
234
226
public function getAdditionalInfoKeys ($ storeId = null ): array
235
227
{
236
- return explode (', ' , $ this ->getValue (Config ::$ keyAdditionalInfoKeys , $ storeId ) ?? '' );
228
+ return explode (', ' , $ this ->getValue (self ::$ keyAdditionalInfoKeys , $ storeId ) ?? '' );
237
229
}
238
230
239
231
/**
@@ -244,6 +236,6 @@ public function getAdditionalInfoKeys($storeId = null): array
244
236
*/
245
237
public function getTransactionInfoSyncKeys ($ storeId = null ): array
246
238
{
247
- return explode (', ' , $ this ->getValue (Config ::$ keyTransactionSyncKeys , $ storeId ) ?? '' );
239
+ return explode (', ' , $ this ->getValue (self ::$ keyTransactionSyncKeys , $ storeId ) ?? '' );
248
240
}
249
241
}
0 commit comments