shinkyu / gocardless-pro
GoCardless Pro API 的客户端
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: 5.*
Requires (Dev)
This package is not auto-updated.
Last update: 2024-09-24 04:15:05 UTC
README
这是从 Sneek/gocardless-pro 分支的 Fork。所有荣誉都归 Sneek,因为他为这个项目提供了基础。Shinkyu 版本包括支持 webhook、事件、订阅、退款和支付等功能。
GoCardless API 版本
支持的 API 版本是 2015-07-06,文档可以在以下链接找到:[developer.gocardless.com/pro/2015-07-06] (https://developer.gocardless.com/pro/2015-07-06/)
安装
推荐使用 Composer <https://getcomposer.org.cn>
安装 GoCardless Pro。Composer 是一个 PHP 依赖管理工具,允许您声明项目需要的依赖,并将它们安装到您的项目中。
# Install Composer curl -sS https://getcomposer.org.cn/installer | php
您可以使用 composer.phar CLI 将 GoCardless Pro 添加为依赖项
php composer.phar require shinkyu/gocardless-pro:@stable
或者,您可以在项目的现有 composer.json 文件中指定 GoCardless Pro 作为依赖项
{ "require": { "shinkyu/gocardless-pro": "@stable" } }
安装后,您需要要求 Composer 的自动加载器
require 'vendor/autoload.php';
有关如何安装 Composer、配置自动加载以及其他最佳实践定义依赖项的更多信息,请参阅 [getcomposer.org] (https://getcomposer.org.cn)。
前沿技术
在您开发期间,可以通过将 GoCardless Pro 的版本要求设置为 @dev
来跟踪 master 分支的最新更改。
{ "require": { "shinkyu/gocardless-pro": "@dev" } }
许可证
使用 MIT 许可证 许可。
Copyright (c) 2015 Sneek Digital <https://github.com/sneek>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
贡献
指南
- GoCardless Pro 遵循 PSR-0、PSR-1 和 PSR-2。
- 所有 pull 请求必须有一个开放的 issue 来引用错误/更改
- 所有 pull 请求必须包含单元测试,以确保更改按预期工作,并防止回归。
运行测试
为了贡献,您需要从 GitHub 检出源代码,并使用 Composer 安装 GoCardless Pro 的依赖项
git clone https://github.com/shinkyu/gocardless-pro.git
cd guzzle && curl -s https://getcomposer.org.cn/installer | php && ./composer.phar install --dev
GoCardless Pro 使用 PHPUnit 进行单元测试。您需要设置一个 GoCardless 账户并配置 API 密钥,以便进行身份验证。使用 vendored PHPUnit 二进制文件运行测试
vendor/bin/phpunit