Giter Site home page Giter Site logo

ussd-php-sample's Introduction

This is a demo app written in PHP to demonstrate how to read and respond to USSD requests. This demo app requires PHP 5.2.0 or later. Here is the expected workflow of the app:

Begin at STEP 1.

STEP 1:

Display the following menu and wait for a response:
    Welcome to Freebie Service.
    1. Free Food
    2. Free Drink
    3. Free Airtime
If the user selects option 1, goto STEP 2
If the user selects option 2, goto STEP 4
If the user selects option 3, goto STEP 6
If the selection is none of the above, goto STEP 9

STEP 2:

Display the following menu and wait for a response:
    Are you sure you want free food?
    1. Yes
    2. No
If the user selects option 1, goto STEP 3
If the user selects option 2, goto STEP 8
If the selection is none of the above, goto STEP 9

STEP 3:

Display the following message and release the session:
    Thank you. You will receive your free food shortly.

STEP 4:

Display the following menu and wait for a response:
    Are you sure you want free drink?
    1. Yes
    2. No
If the user selects option 1, goto STEP 5
If the user selects option 2, goto STEP 8
If the selection is none of the above, goto STEP 9

STEP 5:

Display the following message and release the session:
    Thank you. You will receive your free drink shortly.

STEP 6:

Display the following menu and wait for a response:
    Are you sure you want free airtime?
    1. Yes
    2. No
If the user selects option 1, goto STEP 7
If the user selects option 2, goto STEP 8
If the selection is none of the above, goto STEP 9

STEP 7:

Display the following message and release the session:
    Thank you. You will receive your free airtime shortly.

STEP 8:

Display the following message and release the session:
    Order cancelled.

STEP 9:

Display the following message and release the session:
    Invalid selection.

ussd-php-sample's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.