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.
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
Run firebase init functions
, choosing not to overwrite existing files.
Deploy using
firebase deploy --only functions
Receives a callback for Lipa na MPesa transactions.
It stores the transaction details in Firestore under lmno_responses
for both successful and failed transactions.