I did asked a question setting value in component dynamically from database, providing example for swiftmailer. The same was answered perfectly here
but that answer applies to mailer component only, so how I can achieve the similar functionality for example, I need to added in my config.php values like:
'pp' => [
'class' => 'app/components/paypal', // note: this has to correspond with the newly created folder, else you'd get a ReflectionError
// Next up, we set the public parameters of the class
'client_id' => 'YOUR-CLIENT-ID-FROM-PAYPAL',
'client_secret' => 'YOUR-CLIENT-SECRET-FROM-PAYPAL',
// You may choose to include other configuration options from PayPal
// as they have specified in the documentation
],