
Developed a USSD application with php and mysqli.
=================================================
Note :  if USSD times up when i dial the code again let me continue from the previous page.


1. Agents Assistance
   -----------------
   1. Onboarding 
   2. Pay premium
   3. Exit



 1. Onboarding :
     a, Enter agents id : call API : impact_tsp_app/api/agent_sync_api.php
request : {
    "agent_code": "R00013269"
}

results : {
    "ok": true,
    "message": "Agent validated and saved successfully",
    "data": {
        "agent_code": "R00013269",
        "agent_status": "Active",
        "agent_name": "Aaron Amihere",
        "sales_manager": "Seth Ofori Amankwah",
        "branch_name": "Head Office",
        "agency_index": 129,
        "branchindex": 135,
        "micro_hd_index": 125,
        "userindex": 244
    }
}

if "ok": true then move to the next page else let the agents keep on trying

   b, Enter Customer mobile number : call API :impact_tsp_app/api/get_name.php

Request :  {
  "mobile_no": "233244845114",
  "channel": "mtn-gh"
}

Results : {
    "ok": true,
    "mobile_no": "233244845114",
    "customer_name": "JENNIFER AKUA GIDI",
    "response": {
        "Message": "Success",
        "ResponseCode": "0000",
        "Data": {
            "IsRegistered": true,
            "Name": "JENNIFER AKUA GIDI",
            "Status": "active"
        }
    }
}

note :  if "customer_name": "" is empty let the agents type it there
    c, Enter Date Of Birth : call API to verify the date
































request
==================
1.after saving to table :  main_life & next_kin : call : mandate_create_api.php
2.if payment_status = "Pending" and mobile_no exist in the main_life dont save the record again just call : mandate_create_api.php




Request API
========================
1.create an API for products


table : product
==================
id	display_name	life_benefit	total_monthly_premium
1	Bronze	2000	8
2	Gold	5000	13
3	Platinum	7500	17.5

table : users_logs
==================
userindex_log	userindex	caption	logs_date	path	data_inf	attempted_username





2. create an API for age



table : product
==================
id	display_name	minimum_age	maximum_age
1	Bronze	18	75
2	Gold	18	75
3	Platinum	18	75

table : users_logs
==================
userindex_log	userindex	caption	logs_date	path	data_inf	attempted_username


3. create an API for signup
================================


table : main_life
=============================
main_life_id
mobile_no
customer_name
date_of_birth
gender
policy_no 
product
premium
payment_status ="Pending"
momo_network
onboarding_channel = "USSD"
input_date
email
location
date_of_enrolment
occupation



table : next_kin
==============================
next_kin_id
main_life_id
mobile_no
nextkin_name
date_of_birth
gender
relationship
userindex
input_date


table : users_logs
==================
userindex_log	userindex	caption	logs_date	path	data_inf	attempted_username







