承接 paymint/paymint-laravel 相关项目开发

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

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

paymint/paymint-laravel

Composer 安装命令:

composer require paymint/paymint-laravel

包简介

The official Laravel wrapper for PayMint Africa

README 文档

README

The official Laravel wrapper for PayMint Africa. Seamlessly integrate PayMint into your Laravel application with zero configuration and elegant syntax.

Installation

Install the package via Composer:

composer require paymint/paymint-laravel

Configuration

Add your PayMint API keys to your .env file:

PAYMINT_SECRET_KEY=sk_live_your_secret_key

# Optional: Set a custom base URL for testing or sandbox
# PAYMINT_BASE_URL=https://sandbox.api.paymint.africa/v1/

That's it! The package will automatically load your configuration. You do not need to publish any config files.

Usage

Use the elegant PayMint Facade to interact with the API anywhere in your application.

use PayMint\Laravel\Facades\PayMint;

// Create a Virtual Account
$account = PayMint::virtualAccounts()->create([
    'name' => 'Jane Doe',
    'email' => 'jane@example.com',
    'phone' => '08123456789'
]);

return response()->json($account);

Webhook Verification

Verify incoming webhooks directly inside your Laravel controllers or routes to ensure the payload is securely coming from PayMint.

use Illuminate\Http\Request;
use PayMint\Laravel\Facades\PayMint;
use Illuminate\Support\Facades\Route;

Route::post('/webhook/paymint', function (Request $request) {
    // 1. Get raw payload and signature
    $payload = $request->getContent();
    $signature = $request->header('X-Paymint-Signature');

    // 2. Verify securely
    if (!PayMint::webhooks()->verifySignature($payload, $signature)) {
        return response()->json(['error' => 'Invalid signature detected.'], 401);
    }

    // 3. Process webhook safely!
    $event = $request->input('event');
    
    if ($event === 'payment.success') {
        // Credit the customer's wallet here...
    }

    return response()->json(['status' => 'success']);
});

License

MIT License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2026-06-25