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

ENVIRONMENT is missing in the configuration #35

Open
umarfarukabu opened this issue Nov 23, 2021 · 1 comment
Open

ENVIRONMENT is missing in the configuration #35

umarfarukabu opened this issue Nov 23, 2021 · 1 comment

Comments

@umarfarukabu
Copy link

Why does the momo API keep throwing me the ENVIRONMENT is missing in the configuration, Exception. after i had provided one in the config={

        'ENVIRONMENT': os.environ.get("https://sandbox.momodeveloper.mtn.com/collection/v1_0/bc-authorize"),
        'BASE_URL': os.environ.get("BASE_URL"),
        'CALLBACK_HOST': os.environ.get("http://127.0.0.1:8000"),}

The documentation stated that it was optional but when left blank or provided with one i get that Exception.....whenever i make client.requestToPay(amount='100',
mobile ='233247854320', external_id='324445335').

what could possibly be the case ....?

@sicelo
Copy link

sicelo commented Nov 24, 2021

yes, ENVIRONMENT is 'optional' using this library, because it was written to default to "sandbox" ,

return self.get_property('ENVIRONMENT') or "sandbox"

You are setting a wrong environment in your example.

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