Download the PHP package james-kabz/mpesapkg without Composer

On this page you can find all versions of the php package james-kabz/mpesapkg. 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?

Informations about the package mpesapkg

MpesaPkg (Laravel)

Plug-and-play M-Pesa package with STK, B2C, C2B, and utility APIs. Includes request/response persistence, callback storage, and optional webhook validation.

Quick Start

1) Publish config (optional):

2) Run migrations:

3) Place certificates:

4) Configure env (see template below).

Environment Variables (example)

Note: some sandbox environments reject callback URLs containing the word mpesa in the path. If you see Invalid ValidationURL, use a different prefix such as payments.

Routes (under MPESA_ROUTE_PREFIX)

Response Format

All API responses return:

Generate Security Credential

Using the Config Service

The package exposes a typed config service so you don't need to call config('mpesa...') repeatedly.

MpesaClient and MpesaHelper are resolved from the container, so you can type-hint them and let Laravel inject:

Test Commands (examples)

Set:

STK Push

STK Query

B2C Send

B2C Validated

C2B Register URLs

C2B Simulate

C2B Validation (manual test)

C2B Confirmation (manual test)

Transaction Status

Transaction Status Result (callback test)

Transaction Status Timeout (callback test)

Account Balance

Account Balance Result (callback test)

Account Balance Timeout (callback test)

Reversal

Reversal Result (callback test)

Reversal Timeout (callback test)

Notes


All versions of mpesapkg with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.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 james-kabz/mpesapkg contains the following files

Loading the files please wait ...