Пример #1
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['gip', 'internal', 'funds_transfer']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_funds_transfer", host, port)
""" Initialising the cacher """
session_cache = Cacher()
Пример #2
0
import transaction_processor.loans_processor.repayment as loans_repayment

import transaction_processor.payment_processor.payment_methods as payment_processor
import transaction_processor.payment_processor.momo as pay_momo
import transaction_processor.payment_processor.bank as pay_bank

import core_processor
import session_processor
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher
import secrets
import json
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_agency_services", host, port)

logfile = "Agency"
mtntelco_charge = 0.014
vdftelco_charge = 0.019
bank_code = "pccu"


def get_secret_trxid(code=bank_code.lower(), size=5):
    trxid = secrets.token_urlsafe(size)
    trxid = trxid.replace('_', '')
    trxid = trxid.replace('-', '')
    trxid = code + trxid

    return trxid
Пример #3
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = [
    'account_enquiry',
    'request_accountlist',
]
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_account_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #4
0
from mesika_libs.logging import Logger

__all__ = [
    'goto_start', 'make_response', 'unknown_option', 'date_validation',
    'disable_service'
]
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_core_processor", host, port)

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #5
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['airtime']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_airtime", host, port)

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #6
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['gip', 'internal', 'funds_transfer']
""" Initialising the logger """
host = "logmaster"
port = 24777
#libhandler = Logger("ussd_funds_transfer", host, port)
libhandler = Logger("Progressive", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #7
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['dispense_cash', 'initiate_withdrawal']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_withdrawal_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #8
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['airtime']

""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_airtime_processor", host, port)
Пример #9
0
from mesika_libs.logging import Logger

__all__ = [
    'agent_collections', 'magnet_agent', 'magnet_customer', 'mobile_banking'
]
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_product_views", host, port)
Пример #10
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['view_commissions', 'view_profile', 'view_transactions']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_settings_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #11
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['bankwallet', 'bank_wallet', 'wallet_bank', 'momo']
""" Initialising the logger """
host = "logmaster.mesika.org"
port = 24777
libhandler = Logger("ussd_momo_wallet", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #12
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['login', "status_check"]
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussdsesssion_manager", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #13
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = [
    'store_session', 'store_menupoint', 'get_last_step', 'get_ussd_extra'
]
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_sesssion_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()
Пример #14
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['collections']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_collections_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()
Пример #15
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['support']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_support", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #16
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['pin_reset']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_pin_reset", host, port)
""" Initialising the cacher """
session_cache = Cacher()
Пример #17
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = [
    'payment_methods',
    'bank',
    'momo',
    'loansmomo',
]
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_payment_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #18
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['full_signup', 'partial_signup']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_selfsignup_processor", host, port)
Пример #19
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['get_trxid']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_transaction_id", host, port)

bank_code = ""
''' connect from json file'''
Пример #20
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['get_servicelist']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_service_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #21
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['forex']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_forex_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #22
0
# import mesika_menulibs.core_processor
# import mesika_menulibs.reset_pin
# import core_processor.make_response as core
#import core_processor.goto_start
# from core_processor.make_response import make_response
# from mesika_menulibs.core_processor.goto_start import goto_start
# from mesika_menulibs.core_processor.throw_unknown_option import throw_unknown_option
#
# from mesika_menulibs.coreprocessor import CoreProcessor
# from mesika_menulibs.ussdProcessor import UssdProcessor
# from mesika_menulibs.transactionProcessor import TransactionProcessor
''' Initialising the logger '''

libhandler = Logger(app_or_directory_name="debug",
                    host="local.mesika.org",
                    port=24777,
                    version=1)
logfile = "new_design"

goback_message = "Enter any digit to continue!"
url = "https://magnet.mesika.org:1000"

small_size = 12


# make changes to lib for the requests
def view(request):
    menu_response = " "
    msisdn = request.GET["msisdn"]
    networkid = request.GET["networkid"]
    sessionid = request.GET["sessionid"]
Пример #23
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['deposit']

""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_deposit_processor", host, port)

""" Initialising the cacher """
session_cache = Cacher()
Пример #24
0
import trxid_processor.get_secret_id as trxid_processor
import api_processor.api_json as api_processor

import json
import string
import random
import requests
import datetime
import secrets
from requests.packages.urllib3.exceptions import InsecureRequestWarning

requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
''' Initialising the logger '''

libhandler = Logger(app_or_directory_name="CEM_payment_collections_menu",
                    host="logmaster.mesika.org",
                    port=24777,
                    version=1)
logfile = "live_menu"

goback_message = "Enter any digit to continue!"
url = "https://cem-api.mesika.org/"

bank_code = "CEM"
mtntelco_charge = 0.015
vdftelco_charge = 0.017
airteltigo_charge = 0.017


def get_secret_trxid(code=bank_code.lower(), size=5):
    trxid = secrets.token_urlsafe(size)
    trxid = trxid.replace('_', '')
Пример #25
0
from mesika_libs.logging import Logger

__all__ = ['api_get', 'api_json', 'api_post']

""" Initialising the logger """
host = "10.85.85.80"
port = 24777
libhandler = Logger("ussd_api_calls", host, port)

menu_response = ""
goback_message = ""
userdata = ""
sessionid = ""
networkid = ""
bank_id = ""
bank_code = ""
modul = ""
msisdn = ""
mode = ""
Пример #26
0
from mesika_libs.logging import Logger
from mesika_libs.Caching import Cacher

__all__ = ['loans']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_loans_processor", host, port)
""" Initialising the cacher """
session_cache = Cacher()
Пример #27
0
from mesika_libs.logging import Logger

__all__ = ['call_api']
""" Initialising the logger """
host = "127.0.0.1"
port = 24777
libhandler = Logger("ussd_api_processor", host, port)