List of questions
Related questions
Question 24 - AD0-E718 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\EncryptorInterf ace to decrypt credentials for sensitive dat a. The code that is commonly repeated is as follows:
In each module, the user_secret config is declared 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?
A.
Replace all Vendor\PaymentModule\Gateway\Config\Config Classes With virtualTyp- Of Magento\Payxer.t\Gateway\Conflg\Config and Set <user_secret backend_Model="Magento\Config\Model\Config\Backend\Encrypted" /> under ccnfig.xml
B.
Add a plugin after the getvalue method of $sccpeConfig, remove the $encryptor from dependency and use it in the plugin to decrypt the value if the config name is 'user.secret?
C.
Create a common config service class vendor\Payment\Gateway\config\Config under Vendor.Payment and use it as a parent class for all of the Vender\EaymentModule\Gateway\Config\Config Classes and remove $sccpeConfig and $encryptor dependencies
Your answer:
0 comments
Sorted by
Leave a comment first