Download the PHP package calvinchiulele/mpesa-mz without Composer

On this page you can find all versions of the php package calvinchiulele/mpesa-mz. 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 mpesa-mz

Laravel Package for Vodacom Mozambique M-Pesa

This package is a wrapper for abdulmueid/mpesa-php-api to integrate M-Pesa API easier in Laravel applications

For more information of what M-Pesa is, please refer to M-Pesa official website: https://www.vm.co.mz/en/M-Pesa2

For more information of what abdulmueid/mpesa-php-api is, refer to https://github.com/abdulmueid/mpesa-php-api

1. Installation

All you have to do is the following:

After hitting the above command in terminal, you will be provided a list of all service providers registered in your application. Choose the CalvinChiulele\MPesaMz\Providers\MPesaMzServiceProvider and hit enter. Now if you check your config folder, you'll find your mpesa-config.php file in there.

2. Configuration

After you have published the config files necessary for the package, you've to add all the keys necessary for the config file in your .env in order to the config file work properly.

The .env should be like that:

Where xxx is your data. Note: You've to either use MPESA_API_HOST to reflect to "api.sandbox.vm.co.mz" or production URL from M-Pesa API

And the newly file created config/mpesa-config.php will be like that:

Note : After adding the entries in the .env file, you've to run in your terminal in order to remove the configuration cached file and have the just added values in .env available to be used in config/mpesa-config.php

3. Usage

In order to use the package in your Laravel application, you can use either the facade or get an instance of the M-Pesa service on the Laravel service container.

3.1 - Using the M-Pesa facade

3.2 - Using the M-Pesa service from Laravel service container

4. Testing

  1. Update tests/config/mpesa-config-test.php with required parameters
  2. Enter the test amount and MSISDN in tests/Services/MPesaMzTest.php, respectively on lines 47 and 48
  3. Run PHPUnit 9 binary in vendor/bin/
  4. Check the phone for M-Pesa payment requests

The test case currently creates a new transaction, refunds the transaction and queries the transaction status. Tests may be billable when running on production.

5. License

This library is release under the MIT License. See LICENSE file for details.

6. Authors

Calvin Carlos da Conceição Chiulele [email protected] and contributors

This package is still in development phase, so any suggestions, improvements and recommendations are welcomed.


All versions of mpesa-mz with dependencies

PHP Build Version
Package Version
Requires abdulmueid/mpesa Version ^1.0
illuminate/support Version 5.8.* || 6.* || 7.* || 8.*
php Version ^7.3
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 calvinchiulele/mpesa-mz contains the following files

Loading the files please wait ....