Integrated sms services #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds SMS sending functionality to the MlimiZone USSD project and corrects a typo in the settings file. The new
sms.py
module integrates with the SMSLeopard API to send SMS messages, enabling notifications for user registration, produce listings, and payments. Thesettings.py
file is updated to include SMS credentials and fix the typoALLOWED_ADMIN_IDENTIFIRES
toALLOWED_ADMIN_IDENTIFIERS
, ensuring proper admin identifier configuration.sms.py
) and a settings update to support SMS notifications in the USSD system.sms.py
file uses therequests
library and base64-encoded credentials to call the SMSLeopard API. Settings are updated with environment variables forUSERNAME_SMS
,PASSWORD
, andSOURCE
, loaded viadotenv
.Type of change
How Has This Been Tested?
python mlimi_zone/sms.py <phone_number> <message>
with a valid phone number and message, verifying the API response (status code 200) and receiving the SMS.send_sms
into the USSDView (e.g., registration flow) and confirmed SMS delivery for a new user registration using a test phone number.Checklist: