Lightweight PHP SDK for integrating with the EvPay MNO Payment Gateway. Supports payment requests, reconciliation, and callback handling.
Install via Composer:
composer require salymmbise/evpay- PHP 8.1+
- Composer
require 'vendor/autoload.php';
use EvMak\Client;
$client = new Client(
"https://your-evmak-api-url.com",
"your-username"
);use EvMak\Payment;
$payment = new Payment($client);
$response = $payment->request([
"api_source" => "WEBHOSTTZ",
"api_to" => "TigoPesa", // Mpesa, AirtelMoney, HaloPesa
"amount" => 1000,
"product" => "TestPayment",
"callback" => "https://yourdomain.com/callback",
"mobileNo" => "255686668866",
"reference" => uniqid("EVM")
]);
print_r($response);use EvMak\Reconciliation;
$recon = new Reconciliation($client);
$status = $recon->check("EVM123456");
print_r($status);Your system must handle payment confirmation from EvMak.
Route::post('/callback', function (\Illuminate\Http\Request $request) {
$data = $request->all();
// Validate and store transaction
// Recommended: verify hash and reference
return response()->json([
"Status" => "Success"
]);
});The API uses MD5 hashing:
md5(username . '|' . date('d-m-Y'));This is handled automatically by the SDK.
- Mpesa
- TigoPesa
- AirtelMoney
- HaloPesa
- Always store transactions before sending requests
- Use unique references (
uniqid()or UUID) - Secure your callback endpoint
- Log all API responses
- Implement retries for failed requests
Use sandbox/test endpoint provided by EvMak before going live.
Typical response codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 403 | Authentication failed |
| 404 | Wrong destination |
| 500 | Server error |
Pull requests are welcome. For major changes, open an issue first.
MIT License