nelsius/nelsius-pay-php
最新稳定版本:v1.0.3
Composer 安装命令:
composer require nelsius/nelsius-pay-php
包简介
Official PHP SDK for the Nelsius pay Developer API
README 文档
README
Official PHP SDK by Nelson Siebi for the Nelsius Developer API.
Installation
composer require nelsius/nelsius-pay-php
Note: For manual installation, require the files in src/.
Quick Start
use Nelsius\NelsiusClient; $nelsius = new NelsiusClient('your_secret_key', [ 'base_url' => 'https://api.nelsius.com/api/v1', 'verify_ssl' => false // Set to false for local development (Laragon, WAMP, etc.) ]); // 1. Get Payment Methods $methods = $nelsius->charges->methods(); // 2. Create Hosted Checkout Session $checkout = $nelsius->checkout->createSession([ 'amount' => 5000, 'currency' => 'XAF', 'reference' => 'ORDER_12345', 'description' => 'Purchase Description', 'return_url' => 'https://your-site.com/success', 'cancel_url' => 'https://your-site.com/cancel', 'customer' => [ 'email' => 'customer@example.com', 'name' => 'Customer Name' ] ]); header('Location: ' . $checkout['data']['checkout_url']); // 3. Create Direct Charge (Mobile Money) $charge = $nelsius->charges->create([ 'amount' => 2500, 'currency' => 'XAF', 'method' => 'mobile_money', 'operator' => 'orange', 'customer_phone' => '690000000', 'reference' => 'TXN_REF_001' ]);
Features
- Charges: Direct payment processing (Mobile Money, Crypto, etc.)
- Checkout: Hosted payment pages for easier integration.
- Balance: Check your merchant account balance programmatically.
- Payment Methods: Retrieve supported payment methods dynamically.
License
MIT
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-20