oo-money/oo-stripe-php
Composer 安装命令:
composer require oo-money/oo-stripe-php
包简介
An enhanced, object-oriented wrapper for Stripe's PHP SDK, providing custom typed objects and convenient helper methods.
README 文档
README
A lightweight PHP wrapper for Stripe's PHP SDK, providing an object-oriented interface for more readable and structured access to Stripe objects. oo-stripe-php allows you to work with Stripe data in a more streamlined way by transforming raw data fields into useful objects, such as DateTime.
Features
- Provides dynamic getters for Stripe properties, transforming specific fields into objects (e.g., timestamps to
DateTime). - Uses traits for flexible and reusable getter transformations.
- Lightweight and focused on improving developer experience without altering underlying Stripe API behavior.
Usage
Dynamic Getters
The DynamicGetterTrait allows you to access properties dynamically, with the option to transform specific types (e.g., converting timestamps to DateTime).
// Assuming `created` is a timestamp, `getCreated` will return a DateTime object. $creationDate = $invoice->getCreated(); echo $creationDate->format('Y-m-d H:i:s');
API Documentation
For details on all available fields and methods, refer to the Stripe API documentation for each object type. oo-stripe-php aims to enhance the standard Stripe objects with a more object-oriented interface but otherwise mirrors the structure of Stripe’s SDK.
Contributing
Feel free to submit issues, fork the repository, and send pull requests. Please ensure that your contributions adhere to the existing code style and include relevant tests.
Running Tests
- Install dependencies, including PHPUnit:
composer install
- Run tests:
/vendor/bin/phpunit (or: make unit)
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Note: This project is not affiliated with Stripe, Inc. It’s a community-driven enhancement for developers using the Stripe PHP SDK.
oo-money/oo-stripe-php 适用场景与选型建议
oo-money/oo-stripe-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 oo-money/oo-stripe-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oo-money/oo-stripe-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-09