New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Adobe Commerce Architect Master AD0-E722 Question # 6 Topic 1 Discussion

Adobe Commerce Architect Master AD0-E722 Question # 6 Topic 1 Discussion

AD0-E722 Exam Topic 1 Question 6 Discussion:
Question #: 6
Topic #: 1

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:

AD0-E722 Question 6

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.

Create a common config service class v«ndor\Pay-ient\Gat«way\conf ig\conf ig under Vendor.Payment and use it as a parent class for all of the

Vendor\Payi»entModule\Gateway\Conf ig\Conf ig ClaSSeS and remove $scopeConf ig and Sencryptor dependencies


B.

Replace all Vendor\PaymentModule\Gateway\Config\Config ClaSSeS With virtualType Of Magento\Payiaent\Gateway\Conf ig\Conf ig and Set Under config.xml


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'


Get Premium AD0-E722 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.