Skip to content

Kazeeem/Simpe-USSD-application

Repository files navigation

Simpe-USSD-application

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.

How To Test

  • 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(*)

Screenshot 2023-04-08 at 9 01 47 AM

  • Here is an example of the request of a registered user who wants to check his/her account balance.

Screenshot 2023-04-08 at 9 05 12 AM

Screenshot 2023-04-08 at 9 07 14 AM

Screenshot 2023-04-08 at 9 07 37 AM

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages