TERMINATION_CODE
TERMINATION_CODE
Class Util is a helper class.
A class with function and constant to help easily create USSD. The USSD provider is TxtGhana and the consumer is Korba
processPrevious(string $key, string $value, string $target, array<mixed,array> $history, string $option)
Util public static function processPrevious.
It allows ussd to move to previous page on a menu
| string | $key | |
| string | $value | |
| string | $target | |
| array<mixed,array> | $history | |
| string | $option |
verifyNumberLength(string $number, integer $length = 10) : boolean
Util public static function verifyNumberLength.
It verifies if a number is exactly a particular length
| string | $number | Number String to verify |
| integer | $length | Length to use for validation |
requestToHashedMapArray( $request, \Korba\View $response, string $option = "MAIN_MENU", null|string $auth = null, null|string $type = null) : array
Util public static function requestToHashedMapArray.
It convert request to an array that can be stored in a database
| $request | ||
| \Korba\View | $response | |
| string | $option | |
| null|string | $auth | |
| null|string | $type |
parseResponseToArray(\Korba\View $response, integer $code) : array
Util public static function parseResponseToArray.
Converts request to array which can be sent back to operator
| \Korba\View | $response | |
| integer | $code |