GithubHelp home page GithubHelp logo

creamymilk / darajastk Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 87 KB

A simple implementation ๐Ÿ™‚๐Ÿ™‚ of "Lipa na Mpesa Online using STK Push ๐Ÿ’ธ offered by the Safaricom Daraja Api

Home Page: https://dfjasfkjsadfkljasfkjasdf.herokuapp.com/

License: MIT License

JavaScript 54.58% HTML 8.11% CSS 37.31%
safaricom daraja-api expressjs

darajastk's Introduction

DarajaSTK

A simple implementation of "Lipa na Mpesa Online using STK Push offerd by the Daraja api

NB : All callback info is logged

What is Mpesa Express ?

This is a service where you launch the user M-pesa menu directy from your application by calling the mpesa sim tool kit,and prefill with the amount to pay, the user just inserts the PIN and money automatically deducted from their Mpesa and sent to your Paybill. The merchant simply pushes the transaction details of a payment to customer's phone. After transaction initiation, the customer receives a push notification.Customer enters their M-Pesa pin and presses โ€˜OKโ€™. The transaction is now complete, and a real-time payment confirmation will be sent. The details are sent to the callback set and further processing such as subscription can be carried out. Accepted Number format is only 07.....

SCREENSHOT

Form ScreenShot

To install the dependencies and run

# You must configure environment variables in an (.env) file

$ cp .env.sample .env
# To install dependencies and to run the server

$ npm install 
$ npm start 

darajastk's People

Contributors

creamymilk avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

darajastk's Issues

๐Ÿš€Move the example over to Typescript

Move the token retrieval code to be an express middleware.

Eg.

app.use((req,res,next)=>{
       //Get token
      // req.headers[๐Ÿ”‘] =Bearer ๐Ÿป
      next();
});

app.use("/pay,(req,res)=>{
      //Send STK push
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.