Download the PHP package kabangi/mpesa without Composer

On this page you can find all versions of the php package kabangi/mpesa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
kabangi/mpesa
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package mpesa

M-PESA API Package

Build Status Latest Stable Version Latest Unstable Version License

This is a PHP package for the Safaricom's M-Pesa REST API dubbed DARAJA API.

If you are looking for a laravel implementation do check the following repo Laravel Implementation

Installation

This project supports both composer dependency management tool and can also be used without composer

Using Composer

  1. Run the following command

Without composer

  1. Download the source code as zipped

  2. Follow the following directions

  3. Check the following example for usage https://github.com/Kabangi/mpesa/blob/master/example/mpesa.php

Configuration

The library comes with a structured config file based on the API that you intend to use.

To add the necessary configurations:-

  1. Open the folder installation.

  2. Look for a file named config/mpesa.php

  3. Edit the necessary keys that reflects the product you are using.

Usage

Support

Need support using this package:- Send a quick message here

https://t.me/kabangi

API's Supported

The library implements all the exposed endpoints by Safaricom as listed below:-

1. Lipa na M-Pesa Online Payment

    What it is?

The Lipa na M-Pesa Online Payment endpoint(STK push) allows you to request payment from your users/clients. With this endpoint all the user is required to do is input their M-PESA pin to a prompt to send a payment to you.

    How to implement it?

Read docs here.

2. Lipa na M-Pesa Online Query Request

    What it is?

When you request payment from your users/clients via Lipa na M-Pesa Online endpoint above you might want to know the status of that request. This endpoint facilitates that. It allows you to query the status of any STK push on demand.

    How to implement it?

Read docs here.

3. C2B

    What it is?

This endpoint enables developers to receive real time notifications when a client makes a payments to a merchant's Till number or Paybill number. It assumes the payment are made via the SIM card toolkit and as a developer you need to know when that payment hits the merchants till/paybill number for reconciliation and accounting purposes.

    How to implement it?

Read docs here.

4. B2C

    What it is?

This endpoints enables merchants to pay their customers from they paybill account. Some of the use cases are but not limited to paying salaries, paying promotions to customers etc.

    How to implement it?

Read docs here.

5. B2B

    What it is?

This endpoint allows merchants to transfer funds from business to business accounts.

    How to implement it?

Read docs here.

6. Transaction Status

    What it is?

This endpoint enables developers to initiate status check of a B2B, B2C and C2B transactions. It really comes in handy where one party in a transactions fails/claims not to have received an acknowledgment for a transaction.

    How to implement it?

Read docs here.

7. Reverse API

    What it is?

This endpoint enables merchants to reverse a B2B, B2C or C2B transaction. It allows automation of reversal of erronous payment to a merchant's paybill/till number or payments to goods never delivered.

    How to implement it?

Read docs here.

8. Account Balance

    What it is?

This endpoint enables merchants to query their Till/Paybill numbers account balance on demand.

    How to implement it?

Read docs here.

Inspiration

This package was inspired by the work from smodav work on the following project:- https://github.com/SmoDav/mpesa

Contributors

Gratitudes goes to the following Ninjas for their help during my integration process and the things I had to learn along the way fom them or their code:-


Julius Kabangi

License

The M-Pesa Package is open-sourced software licensed under the MIT license.


All versions of mpesa with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kabangi/mpesa contains the following files

Loading the files please wait ....