yuriizee/sensebank-installment-sdk
Composer 安装命令:
composer require yuriizee/sensebank-installment-sdk
包简介
PHP SDK library for Sensebank installment
README 文档
README
This library provides a clean, flexible and robust way to integrate with the SenseBank Installment SDK. It wraps up various SDK features into easy-to-use PHP classes and methods, minimizing the effort required to interact with the SDK and improving the maintainability of your project.
Installation
composer require yuriizee/sensebank-installment-sdk
Features
Below are some features provided by this library:
- Order creation/cancellation (Order class)
- Statement management (Statement class)
- Managing guarantees (Guarantee class)
- Singleton client access (InstallmentSDK class)
Requirements
- PHP >= 8.2
API Documentation
Link to detailed API documentation.
Usage
<?php declare(strict_types=1); use Yuriizee\SenseBankInstallmentSDK\Client; use Yuriizee\SenseBankInstallmentSDK\Config; use Yuriizee\SenseBankInstallmentSDK\DataObjects\Order\CreateOrderRequest; use Yuriizee\SenseBankInstallmentSDK\Enums\OrderLimits; use Yuriizee\SenseBankInstallmentSDK\Helper\Money; use Yuriizee\SenseBankInstallmentSDK\InstallmentSDK; require __DIR__ . '/../vendor/autoload.php'; $config = new Config( url: 'https://retailapi.sensebank.com.ua:8243/api/PartnerInstallment/v1.0/', partnerId: 'partner', password: '!PaRt_Ne09_R#' ); /** * You can create instance with own Psr\Http\Client\ClientInterface implemented class */ $client = (new Client($config))->getClient(); $sdk = InstallmentSDK::getInstance($config, $client); $request = new CreateOrderRequest( mPhone: '+380670000000', panEnd: '0000', orderId: rand(), orderSum: Money::toKopecks( rand(OrderLimits::MIN_SUM->value, OrderLimits::MAX_SUM->value) ), orderTerm: rand(2, 5), callBackURL: 'https://example.dev', eMailPartner: 'test@example.dev' ); $response = $sdk->order()->createOrder($request);
License
SENSEBANK INSTALLMENT SDK PHP Library is open source software licensed under MIT
Config Class
Config class is used to set the configuration for the API client:
- url
- partnerId
- password
These parameters should be obtained directly from Sens Bank
Contributing
Contributions are welcome! Please feel free to open issues for bug reports, feature requests or submit a pull request.
Contact information
yuriyzee@gmail.com
yuriizee/sensebank-installment-sdk 适用场景与选型建议
yuriizee/sensebank-installment-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 239 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 02 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 yuriizee/sensebank-installment-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yuriizee/sensebank-installment-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 239
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 23
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-04