I am looking to add a file merchants.php
which will contain all my merchant config info, api key, etc…
What is the correct way to go about getting that file included?
I am looking to add a file merchants.php
which will contain all my merchant config info, api key, etc…
What is the correct way to go about getting that file included?
Put the file int your /config folder and define a $config array in the file, than load it in your /config/bootstrap.php
.
Configure::load('merchants', 'default', false);
Thank you very much! =]
Follow up question…
Im not in a place where I can test just yet, I am awaiting a reset of sandbox credentials…
when I have my array like
return [
'Merchants' => [
'MERCHANT_LOGIN_ID' => '',
'MERCHANT_TRANSACTION_KEY' => '',
'MERCHANT_SANDBOX' => true
]
];
Do I read it like so?
Configure::read('Merchants.MERCHANT_LOGIN_ID')