Logo Lanfrica

alfred-ojuku/Hermes

Domaine:

digital infrastructure

Type de record:

software
Créateur:
alf
Hôte:
This is a payments integration app. It can do the following. 1) Mpesa STK push initiation and callback confirmation. 2) KCB payments notifications receival and storage.. # M-PESA This payments application is for M-pesa and KCB. One can do the following with the app with regards to M-Pesa. - Initiated an STK Push. - Receive callbacks from mpesa on the state of the initiated stkpush. - Receive confirmation notifications from M-pesa. - Get transactions from the transactions table (data received in the confirmation URL's) using the mpesa transaction id. - Search the callbacks database using the last for characters of the mpesa transaction id. For KCB, the app has one endpoint that receives notification incase any transaction happens in your KCB vooma till account. The ipn endpoint checks and verifies the payload's signature. In my case, I deployed the app in google cloud run using docker but you can host and run the app anywhere, below are instructions on how to set the app running ## Getting started To get the app up and running locally follow these steps; - Install python and pip and cd into the app folder. - Make sure you have redis up and running. - Make sure you have all the environment varibales required, below is the list. - CONSUMER_KEY - CONSUMER_SECRET - BUSINESS_SHORTCODE - AUTH_URL - STK_URL - REDIS_HOST - CALLBACKURL - Create a vritual environment and install the python libraries in the requirements.txt file using this commanf ```pip3 install -r requiremenst.xt``` - Run the app using this command in the terminal ```uvicorn main:app --reload --host 0.0.0.0 --port 8080``` - in your browser visit localhost to view the swagger docs. You can deploy the app to production using any means you wish, the gitlab ci file is the ci/cd pipeline for google cloud run deployement.

Languages