open-pix/php-sdk
Composer 安装命令:
composer require open-pix/php-sdk
包简介
PHP OpenPix/Woovi SDK
README 文档
README
Welcome to the OpenPix PHP SDK! This SDK provides convenient access to the OpenPix REST API, allowing you to easily integrate payment services into your PHP applications.
Documentation
See SDK documentation and Rest API documentation.
Installation
Install the SDK with the necessary dependencies using Composer:
$ composer require open-pix/php-sdk guzzlehttp/guzzle guzzlehttp/psr7
Basic usage
Here is the basic usage of the SDK. See SDK documentation for more details.
use OpenPix\PhpSdk\Client; // Load autoload of Composer. require_once __DIR__ . "/vendor/autoload.php"; $client = Client::create("YOUR_APP_ID"); // Create a customer. $customer = [ "name" => "Dan PHP-SDK", "taxID" => "00000000000", // CPF "email" => "email0@example.com", "phone" => "5511999999999", "correlationID" => "test-php-sdk-customer-" . mt_rand(1, 10000), ]; $client->customers()->create($customer); // Create a charge using above customer. $charge = [ // Charge value. "value" => 1000, // (R$ 10,00) // Your correlation ID to keep track of this charge. "correlationID" => "test-php-sdk-charge-" . mt_rand(1, 10000), // Charge customer. "customer" => $customer, ]; $result = $client->charges()->create($charge); // Get the generated dynamic BR code to be rendered as a QR Code. echo $result["brCode"] . "\n";
Contributing
If you have suggestions for how OpenPix PHP SDK could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.
License
OpenPix PHP SDK is distributed under the terms of the MIT license.
open-pix/php-sdk 适用场景与选型建议
open-pix/php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.5k 次下载、GitHub Stars 达 13, 最近一次更新时间为 2023 年 06 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 open-pix/php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 open-pix/php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-08
