alexasomba/lenco-php
Composer 安装命令:
composer require alexasomba/lenco-php
包简介
PHP SDK for Lenco API - Payments, Transfers, Collections
README 文档
README
PHP SDK for Lenco API - Payments, Transfers, Collections
Installation
composer require alexasomba/lenco-php
Quick Start
<?php use Lenco\Client; $lenco = new Client([ 'api_key' => getenv('LENCO_API_KEY'), 'environment' => 'production', // or 'sandbox' ]); // Get accounts $accounts = $lenco->accounts->list(); // Transfer to bank account $transfer = $lenco->transfers->toBankAccount([ 'accountId' => 'your-account-uuid', 'accountNumber' => '0123456789', 'bankId' => 'bank-uuid', 'amount' => 10000, 'reference' => 'payment-001', 'narration' => 'Payment for services', ]); // Collect via mobile money $collection = $lenco->collections->fromMobileMoney([ 'amount' => 5000, 'reference' => 'order-123', 'phone' => '0971234567', 'operator' => 'airtel', 'country' => 'zm', ]);
Laravel Integration
// config/services.php 'lenco' => [ 'key' => env('LENCO_API_KEY'), 'environment' => env('LENCO_ENVIRONMENT', 'production'), ], // app/Providers/AppServiceProvider.php use Lenco\Client; public function register() { $this->app->singleton(Client::class, function ($app) { return new Client([ 'api_key' => config('services.lenco.key'), 'environment' => config('services.lenco.environment'), ]); }); }
Features
- Full PHP 8.1+ support
- Accounts, Banks, Transfers, Collections, Settlements, Transactions APIs
- Webhook signature verification
- Automatic retries with exponential backoff
- Laravel service provider included
Documentation
Full API documentation available at docs.lenco.co
Author
Alexander Asomba (@alexasomba) · 𝕏 @alexasomba
License
MIT
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-05