-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load environment configs from database #34
Comments
I second you on this. They should just do away with the .env file. I have to edit their repository before i use it. Please work on this |
why do you have to edit the repo? just create a .env file and paste your mpesa configs there. |
I agree with that. The problem comes when you have to explain this to a client who wants things done and he/she understands nothing about accessing and editing files on a server. It would be better if I just add a section to edit the configuration on their website and for Mpesa SDK to pull the configuration from the database. And using the env method will not support that It's a design practice for sdks. |
so you guys want to store configs in a database? |
Not necessarily. I think it would be great if you you went with @Nickbahson option |
On it guys. I Will add this option |
the best way is to add a config that can override the default env |
@josiahke , you don't have to override the default .env file unless you have to. |
Would be great if there was a way to set the environment configs on every request, like load the required values from a database before calling e.g. like
//Example
`$mpesa->setConfigs( [
MPESA_CONSUMER_KEY= [consumer key]
MPESA_CONSUMER_SECRET=[consumer secret]
MPESA_ENV=[live or sandbox]
];
);
$mpesa->STKPushSimulation();`
The text was updated successfully, but these errors were encountered: