承接 salymmbise/evpay 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

salymmbise/evpay

最新稳定版本:v1.0.2

Composer 安装命令:

composer require salymmbise/evpay

包简介

EvMak MNO Payment API PHP SDK

README 文档

README

Lightweight PHP SDK for integrating with the EvPay MNO Payment Gateway. Supports payment requests, reconciliation, and callback handling.

🚀 Installation

Install via Composer:

composer require salymmbise/evpay

⚙️ Requirements

  • PHP 8.1+
  • Composer

📦 Basic Usage

1. Initialize Client

require 'vendor/autoload.php';

use EvMak\Client;

$client = new Client(
    "https://your-evmak-api-url.com",
    "your-username"
);

2. Send Payment Request

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);

3. Check Transaction (Reconciliation)

use EvMak\Reconciliation;

$recon = new Reconciliation($client);

$status = $recon->check("EVM123456");

print_r($status);

🔐 Callback Handling

Your system must handle payment confirmation from EvMak.

Example (Laravel)

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"
    ]);
});

🔑 Hash Generation

The API uses MD5 hashing:

md5(username . '|' . date('d-m-Y'));

This is handled automatically by the SDK.

📱 Supported Networks

  • Mpesa
  • TigoPesa
  • AirtelMoney
  • HaloPesa

⚠️ Best Practices

  • 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

🧪 Testing

Use sandbox/test endpoint provided by EvMak before going live.

❗ Error Handling

Typical response codes:

Code Meaning
200 Success
403 Authentication failed
404 Wrong destination
500 Server error

🤝 Contributing

Pull requests are welcome. For major changes, open an issue first.

📄 License

MIT License

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固