Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 983 Bytes

File metadata and controls

36 lines (20 loc) · 983 Bytes

Mpesa Callback Listener

A listener for MPesa post requests from Safaricom's gateway API.

The app uses CloudFunctions for Firebase to expose a publicly accessible endpoint, stores the transaction details in Cloud Firestore.

Refactored from: Mpesa Callback Listener.

Installation

git clone https://github.com/MachariaK/Lipa-Na-Mpesa-Online-Firestore-Cloud-Function.git

cd Lipa-Na-Mpesa-Online-Firestore-Cloud-Function

yarn install

cd functions 

npm install

Deploy to Firebase

Run firebase init functions, choosing not to overwrite existing files.

Deploy using
firebase deploy --only functions

Endpoints

/lmno_callback_url

Receives a callback for Lipa na MPesa transactions.
It stores the transaction details in Firestore under lmno_responses for both successful and failed transactions.