1. Go to this page and download the library: Download emagombe/mpesa-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
emagombe / mpesa-api example snippets
use emagombe\Mpesa;
$mpesa = Mpesa::init(
$api_key, // API Key from portal
$public_key, // Public Key from portal
"development" // "development" or "production"
);