QuestionQ4
VerifiedDesign and implement optimal solutions for Adobe Commerce to meet business needsWhile reviewing a newly created pull request that refactors several custom payment methods, the Architect observes that multiple classes rely on \Magento\Framework\Encryption\EncryptorInterface to decrypt sensitive credential data. The commonly duplicated code is:

In every module, the user_secret configuration is declared as follows:

The Architect must recommend an optimal approach to eliminate redundant dependencies and duplicated code across the methods.
Which solution should the Architect recommend?
Community Discussion