GithubHelp home page GithubHelp logo

kalekachali / mpesa-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alienwithin/mpesa-api

0.0 0.0 0.0 43 KB

PHP implementation of MPESA checkout API. Simple for even the non techies.

Home Page: http://crackthecode.co.ke/MPESA/sampleCheckout.php

License: GNU General Public License v3.0

PHP 100.00%

mpesa-api's Introduction

MPESA-API

PHP implementation of MPESA checkout API. Simple for even the non techies.

TRY OUT A sample of the checkout process HERE

The $PASSWORD must be generate using the following approach:

$MERCHENTS_ID = $PAYBILL_NO;
$TIMESTAMP = date("YmdHis",time());// in this format strictly
$PASSKEY = "your SAG password";
$PASSWORD = base64_encode(hash("sha256", $MERCHENTS_ID.$PASSKEY.$TIMESTAMP ,True));

PLEASE NOTE: _if $TIMESTAMP used is different from the one used to create the $PASSWORD it will lead to AUTHETICATION ERROR

And you are DONE. Simple.


What happens?

  1. You request for a checkout through the requestcheckout.php; which runs a ussd prompt of the online checkout to the phone number.
  2. Response is sent to your phone for verification; through your bonga pin.
  3. After verification you are asked to confirm payment .
  4. After confirmation transaction is processed by callback url processcheckout.php

mpesa-api's People

Contributors

icrackthecode avatar kn9ts avatar

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.