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:
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?
raideer
1 month, 1 week ago