Adobe AD0-E722 Exam - Topic 1 Question 3 Discussion
While reviewing a newly developed pull request that refactors multiple custom payment methods, the Architect notices multiple classes that depend on \Magento\Framework\Encryption\EncryptorInterface to decrypt credentials for sensitive data. The code that is commonly repeated is as follows:The Architect needs to recommend an optimal solution to avoid redundant dependency and duplicate code among the methods. Which solution should the Architect recommend?
B) Replace all Vendor\PaymentModule\Gateway\Config\Config ClaSSeS With virtualType Of Magento\Payiaent\Gateway\Conf ig\Conf ig and Set <user_secret backend_Model='Magento\Config\Model\Config\Backend\Encrypted' /> Under config.xml
A) Create a common config service class vndor\Pay-ient\Gatway\conf ig\conf ig under Vendor.Payment and use it as a parent class for all of the
C) Add a plugin after the getvalue method of $scopeConfig, remove the $encryptor from dependency and use it in the plugin to decrypt the value if the config name is user.secret'
Wei
7 months agoBilly
7 months agoChristiane
7 months agoDetra
7 months agoKate
7 months agoCheryll
8 months agoHana
8 months agoJesus
8 months agoShanda
8 months agoZoila
8 months agoAlpha
8 months agoJeannetta
8 months agoLeatha
8 months agoRyan
8 months agoTelma
8 months agoSherell
9 months agoJackie
9 months ago