定制 oo-money/oo-stripe-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Latest Version License

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

  1. Install dependencies, including PHPUnit:
composer install
  1. 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.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固