openpesa / laravel-pesa
Laravel应用简单集成OpenAPI
v1.0.2
2022-03-03 15:54 UTC
Requires
- php: ^7.4|^8.0
- illuminate/contracts: ^7.0|^8.0|^9.0
- openpesa/pesa: ^0.1.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^5.0|^6.23|^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
README
提供与移动货币运营商(如Vodacom的M-Pesa)无缝集成的简便方法,以便轻松集成到您的Laravel应用程序中。💰
文档
🚧 进行中
有关包使用详细说明,请参阅此处可用的示例readme:这里。
🚀 安装
您可以通过Composer安装此包
composer require openpesa/laravel-pesa
💼 使用
使用外观
use Openpesa\Pesa\Facades\Pesa; // This route will be mapped to: `your-URL/api/charge` Route::get('/charge', function () { $response = Pesa::c2b([ 'input_Amount' => 5000, // Amount to be charged 'input_Country' => 'TZN', 'input_Currency' => 'TZS', 'input_CustomerMSISDN' => '000000000001', // Replace with your phone number 'input_ServiceProviderCode' => '000001', // Replace with your service provider code given by M-Pesa 'input_ThirdPartyConversationID' => 'mpesatz', // Unique 'input_TransactionReference' => 'imethibitishwa', // Unique 'input_PurchasedItemsDesc' => 'Item description' }); return $response; });
💼 使用
composer test
📜 更新日志
请参阅CHANGELOG了解最近更改的详细信息。
🤝 贡献
请参阅CONTRIBUTING以获取详细信息。
🔐 安全漏洞
请参阅我们关于如何报告安全漏洞的安全策略。
👥 致谢
📄 许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。