24
24
use Magento \Vault \Model \VaultPaymentInterface ;
25
25
26
26
/**
27
- * Class ConfigProvider
27
+ * Provide tokens config
28
28
* @api
29
29
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
30
+ * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
30
31
*
31
32
* @api
32
33
* @since 100.1.0
@@ -113,6 +114,8 @@ public function __construct(
113
114
}
114
115
115
116
/**
117
+ * Get list of tokens components
118
+ *
116
119
* @param string $vaultPaymentCode
117
120
* @return TokenUiComponentInterface[]
118
121
* @since 100.1.0
@@ -184,6 +187,13 @@ public function getTokensComponents($vaultPaymentCode)
184
187
->create (),
185
188
]
186
189
);
190
+ $ this ->searchCriteriaBuilder ->addFilters (
191
+ [
192
+ $ this ->filterBuilder ->setField (PaymentTokenInterface::IS_VISIBLE )
193
+ ->setValue (1 )
194
+ ->create (),
195
+ ]
196
+ );
187
197
188
198
$ searchCriteria = $ this ->searchCriteriaBuilder ->create ();
189
199
@@ -195,6 +205,8 @@ public function getTokensComponents($vaultPaymentCode)
195
205
}
196
206
197
207
/**
208
+ * Get component provider
209
+ *
198
210
* @param string $vaultProviderCode
199
211
* @return TokenUiComponentProviderInterface|null
200
212
*/
@@ -210,6 +222,7 @@ private function getComponentProvider($vaultProviderCode)
210
222
211
223
/**
212
224
* Get active vault payment by code
225
+ *
213
226
* @param string $vaultPaymentCode
214
227
* @return VaultPaymentInterface|null
215
228
*/
@@ -222,6 +235,7 @@ private function getVaultPayment($vaultPaymentCode)
222
235
223
236
/**
224
237
* Returns payment token entity id by order payment id
238
+ *
225
239
* @return int|null
226
240
*/
227
241
private function getPaymentTokenEntityId ()
@@ -237,6 +251,7 @@ private function getPaymentTokenEntityId()
237
251
* Returns order payment entity id
238
252
* Using 'getReordered' for Reorder action
239
253
* Using 'getOrder' for Edit action
254
+ *
240
255
* @return int
241
256
*/
242
257
private function getOrderPaymentEntityId ()
@@ -250,6 +265,7 @@ private function getOrderPaymentEntityId()
250
265
251
266
/**
252
267
* Get payment data helper instance
268
+ *
253
269
* @return Data
254
270
* @deprecated 100.1.0
255
271
*/
@@ -263,6 +279,7 @@ private function getPaymentDataHelper()
263
279
264
280
/**
265
281
* Returns order repository instance
282
+ *
266
283
* @return OrderRepositoryInterface
267
284
* @deprecated 100.2.0
268
285
*/
@@ -278,6 +295,7 @@ private function getOrderRepository()
278
295
279
296
/**
280
297
* Returns payment token management instance
298
+ *
281
299
* @return PaymentTokenManagementInterface
282
300
* @deprecated 100.2.0
283
301
*/
0 commit comments