PHPackages                             hubtel-gh/general-services-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hubtel-gh/general-services-sdk-php

ActiveProject[Utility &amp; Helpers](/categories/utility)

hubtel-gh/general-services-sdk-php
==================================

Framework to use hubtel ussd system.

13672PHPCI failing

Since Feb 20Pushed 5y ago5 watchersCompare

[ Source](https://github.com/hubtel/general-services-sdk-php)[ Packagist](https://packagist.org/packages/hubtel-gh/general-services-sdk-php)[ RSS](/packages/hubtel-gh-general-services-sdk-php/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

HUBTEL GENERAL SERVICES SDK PHP
===============================

[](#hubtel-general-services-sdk-php)

Introduction
------------

[](#introduction)

This is a Framework for building Ussd applications in PHP against the [Hubtel Programmable Services](https://developers.hubtel.com/reference#sample-general-services-interaction).

This project is ported from the [original C# version](https://github.com/hubtel/ussd-framework) and [USSD Framework in PHP](https://github.com/McAngelo/php-ussd-framework).

Purpose
-------

[](#purpose)

There are ways to integrate with the [Hubtel Programmable Services](https://developers.hubtel.com/reference#sample-general-services-interaction) across programming languages. This project is particularly to integrate with PHP.

Specifications
--------------

[](#specifications)

- Application configuration settings
- PHP object oriented architecture
- Session storage Redis store or any RDMS
- Standards for development

Installation
------------

[](#installation)

**1 Require Composer**PHP General Services Framework  can smoothly run on newer PHP versions. The Hubtel Programmable Services PHP SDK can be installed with Composer. Run this command:

```
$ composer require hubtel-gh/general-services-sdk-php
```

\#OR Clone the repository unto your machine/server, then navigate into the project.

**2 Create Session Storage with Redis or any RDMS**For Redis, Create a Redis Store implementing \\HubtelUssdFramework\\SessionStore, Configure accordingly.

```
'scheme' => '',
'host'   => '',
'port'   => ''
```

**3 Define the applications settings and in Index.php file**

```
Ussd::process('logger file', 'RedisStore', 'USSDApp', 'USSDMain', 'Main startup method/action for the USSD('start')', 'server');

USSDApp - # the folder that contains all your ussd applications logic
USSDMain - # the main controller/class of your ussd logic
start - # the main action/function/method of your ussd logic
storageType - # RedisStore
'./general.log' - # path to your logger file
```

Sample

```
    Ussd::process('./general.log', new RedisStore(), 'USSDApp', 'USSDMain', 'start', $_ENV['SERVER']);
```

Usage
-----

[](#usage)

Run the script using the following command

```
$ php -S (Server address)
```

Demo
----

[](#demo)

```
...

    # Main startup method/action for the USSD initiates the USSD session
    public function start()
    {
        $menu = new \UssdFramework\UssdMenu();
        $menu->header($this->_header)
                ->createAndAddItem('List Items', 'list_items')
                ->createAndAddItem('Exit', 'close', 'Main');
        return $this->renderMenu($menu);
    }

     public function list_items()
    {$menuHeader = 'Menu Header';

        $menu = new \UssdFramework\UssdMenu();
        $menu->header($menuHeader)
                ->createAndAddItem('Sunday', 'e_menu')
                ->createAndAddItem('Monday', 'e_menu')
                ->createAndAddItem('Tuesday', 'e_menu')
                ->createAndAddItem('Wednesday', 'e_menu')
                ->createAndAddItem('Thurday', 'e_menu')
                ->createAndAddItem('Friday', 'e_menu')
                ->createAndAddItem('Saturday', 'e_menu')
                ->addItem(new \UssdFramework\UssdMenuItem('0', 'Back', 'e_menu'));

        return $this->renderMenu($menu);
    }

    # display the menu
    public function e_menu(){

        return $this->redirect('start');
    }

     # Close user's USSD session
    public function close()
    {
        # closing message
        $message = "$this->_header \n\nThank you for using our USSD service";
        return $this->render($message);
    }
...
```

Development Environment Setup
-----------------------------

[](#development-environment-setup)

1. Install [Docker](https://hub.docker.com)
2. Run Redis Docker Image

```
$ docker run -d -p 6379:6379 --name redis1 redis
```

3. Resources

- [Redis](https://packagist.org/packages/predis/predis)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ef42eab1aa44e039c4e493ecbcbab59eb634b284e9aad77e77eda1074f72b7f?d=identicon)[Kenny-Rogers](/maintainers/Kenny-Rogers)

---

Top Contributors

[![Kenny-Rogers](https://avatars.githubusercontent.com/u/12761596?v=4)](https://github.com/Kenny-Rogers "Kenny-Rogers (2 commits)")[![EwurasiD](https://avatars.githubusercontent.com/u/21361934?v=4)](https://github.com/EwurasiD "EwurasiD (1 commits)")

### Embed Badge

![Health badge](/badges/hubtel-gh-general-services-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/hubtel-gh-general-services-sdk-php/health.svg)](https://phpackages.com/packages/hubtel-gh-general-services-sdk-php)
```

###  Alternatives

[zservices/query

Pacote para consultas em serviços do governo.

131.1k](/packages/zservices-query)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
