File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
app/code/Magento/Payment/Model/Method Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Framework \Exception \LocalizedException ;
11
11
use Magento \Framework \Exception \NotFoundException ;
12
12
use Magento \Payment \Gateway \Command \CommandPoolInterface ;
13
+ use Magento \Payment \Gateway \Config \ValueHandlerPool ;
13
14
use Magento \Payment \Gateway \Config \ValueHandlerPoolInterface ;
14
15
use Magento \Payment \Gateway \Data \PaymentDataObjectFactory ;
15
16
use Magento \Payment \Gateway \Validator \ValidatorPoolInterface ;
@@ -353,6 +354,22 @@ private function getConfiguredValue($field, $storeId = null)
353
354
return $ handler ->handle ($ subject , $ storeId ?: $ this ->getStore ());
354
355
}
355
356
357
+ /**
358
+ * Return value without applying custom handlers
359
+ *
360
+ * @param string $field
361
+ * @param null $storeId
362
+ * @return mixed
363
+ */
364
+ private function getDefaultConfiguredValue ($ field , $ storeId = null ) {
365
+ $ handler = $ this ->valueHandlerPool ->get (ValueHandlerPool::DEFAULT_HANDLER );
366
+ $ subject = [
367
+ 'field ' => $ field
368
+ ];
369
+
370
+ return $ handler ->handle ($ subject , $ storeId ?: $ this ->getStore ());
371
+ }
372
+
356
373
/**
357
374
* {inheritdoc}
358
375
*/
@@ -361,6 +378,18 @@ public function getConfigData($field, $storeId = null)
361
378
return $ this ->getConfiguredValue ($ field , $ storeId );
362
379
}
363
380
381
+ /**
382
+ * Retrieve default information from payment configuration
383
+ *
384
+ * @param string $field
385
+ * @param int|string|null|\Magento\Store\Model\Store $storeId
386
+ *
387
+ * @return mixed
388
+ */
389
+ public function getDefaultConfigData ($ field , $ storeId = null ) {
390
+ return $ this ->getDefaultConfiguredValue ($ field , $ storeId );
391
+ }
392
+
364
393
/**
365
394
* {inheritdoc}
366
395
*/
You can’t perform that action at this time.
0 commit comments