openpesa/pesa
Composer 安装命令:
composer require openpesa/pesa
包简介
Pesa PHP SDK
README 文档
README
Pesa SDK for PHP
Version 2 | Work in Progress 🚧
The Pesa SDK for PHP makes it easy for developers to access OpenAPI in their PHP code, and build robust applications and software using services like Customber 2 Bussiness, Query etc.
Documentation
Take a look at the API docs here.
Getting Started
-
Sign up for OpenAPI Portal – Before you begin, you need to sign up for an account and retrieve your credentials.
-
Minimum requirements – To run the SDK, your system will need to meet the minimum requirements, including having PHP >= 7.1.
-
Install the SDK – Using [Composer] is the recommended way to install the Pesa SDK for PHP. The SDK is available via [Packagist] under the
openpesa/php-pesapackage. If Composer is installed globally on your system, you can run the following in the base directory of your project to add the SDK as a dependency:composer require openpesa/pesa
Please see the Installation section of the User Guide for more detailed information about installing the SDK through Composer and other means.
-
Using the SDK – The best way to become familiar with how to use the SDK is to read the User Guide.
Usage
Quick Examples
require 'vendor/autoload.php'; use Openpesa\SDK\Pesa; // Intiate with credentials $pesa = new Pesa([ 'api_key' => 'YOUR_API_KEY', 'public_key' => 'PUBLIC_KEY', 'client_options' => [], ],'sandbox'); // Setup the transaction $data = [ 'input_Amount' => '10000', 'input_Country' => 'TZN', 'input_Currency' => 'TZS', 'input_CustomerMSISDN' => '255766303775', 'input_ServiceProviderCode' => '000000', 'input_ThirdPartyConversationID' => 'rerekf', 'input_TransactionReference' => rand(), 'input_PurchasedItemsDesc' => 'Test Two Item' ]; // Execute $result = $pesa->c2b($data); // Print results var_dump($result);
For more example check pesa-demo-example.
Testing
composer test
Opening Issues
If you have a feature requrest or you encounter a bug, please file an issue on our issue tracker on GitHub.
Resources
- User Guide – For both getting started and in-depth SDK usage information
- API Docs – For details about operations, parameters, and responses
- Blog – Tips & tricks, articles, and announcements
- Sample Project - A quick, sample project to help get you started
- Issues – Report issues, submit pull requests, and get involved
- @openpesa – Follow us on Twitter
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please review our CONTRIBUTING for details.
Security
If you discover any security related issues, please email alphaolomi@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
openpesa/pesa 适用场景与选型建议
openpesa/pesa 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.46k 次下载、GitHub Stars 达 29, 最近一次更新时间为 2020 年 10 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「pesa」 「mobile-money」 「openpesa」 「tanzania」 「pesa-sdk」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 openpesa/pesa 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 openpesa/pesa 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 openpesa/pesa 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
This is simple PHP Package to interact with Moneroo API.
Mobile payments API - Kenya
A laravel package that integrates into the pesapal api
Modern Laravel package for Flutterwave v4 API integration
Shoket is a PHP client for the Shoket Payment API.
统计信息
- 总下载量: 1.46k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 30
- 点击次数: 12
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-09
