QuestionQ48
VerifiedOrders, Payments, Shipping, and TaxWhile reviewing a newly developed pull request that refactors several custom payment methods, the Architect observes that multiple classes depend on \Magento\Framework\Encryption\EncryptorInterface to decrypt credentials containing sensitive data. The commonly repeated code is:

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

The Architect must recommend an optimal solution that avoids redundant dependencies and duplicate code across the methods.
Which solution should the Architect recommend?
Community Discussion