This is a simple USSD application written with Vanilla PHP, it allows users to do the following:
- Register
- Send Money
- Withdraw Money
- Check Balance
P.S: CODE PERFECTION WAS NOT THE GOAL OF THIS PROJECT BUT RATHER FULL FOCUS ON FUNCTIONALITY, DO NOT USE IN PRODUCTION.
- Run the project on Postman e.g http:localhost/ussd/index.php
- The acceptable request method is POST
- The following keys should be added to the "form-data"
- sessionId
- serviceCode
- phoneNumber
- text
- Every menu option chosen should be typed into the text field. For menus that have sub-menus, separate the options or inputs with asterisks(*)
- Here is an example of the request of a registered user who wants to check his/her account balance.
If you want to the system to send an SMS, create a file called "secrets.php" in the root folder and place your Afrikastalking API key in there and the sms shortcode using the following constants:
- API_KEY
- SMS_SHORT_CODE
Set the SEND_SMS constant in the Utility.php class to true.