Skip to content
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

mtnmomo.errors.ConfigurationError: ENVIRONMENT is missing in the configuration #4

Closed
umarfarukabu opened this issue Nov 13, 2021 · 3 comments

Comments

@umarfarukabu
Copy link

umarfarukabu commented Nov 13, 2021

Hello am trying to integrate the momo API in my Django web app but i keep getting this error even though i have set the Environment Variable in the config file. it says in your Readme that it's optional to set the environment variable which when left blank it still raises the same exception : Here is what i did
config = { 'ENVIRONMENT': os.environ.get("https://sandbox.momodeveloper.mtn.com/collection/v1_0/requesttopay"),
'BASE_URL': os.environ.get("http://127.0.0.1:8000"),
'CALLBACK_HOST': os.environ.get("http://127.0.0.1:8000"), }

mtnmomo.errors.ConfigurationError: ENVIRONMENT is missing in the configuration

@sikaili99
Copy link
Owner

sikaili99 commented Nov 13, 2021

Hey, I think the issue is the setup you've used. Can you create a .env and update it with the variables that are in .env.example file? It should work . Don't edit config.py file

@sikaili99
Copy link
Owner

@umarfarukabu did you manage to get past the configuration errors? Thank you

@sikaili99
Copy link
Owner

I am closing this now. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants