buckaroo / sdk
Buckaroo 支付 SDK
1.14.1
2024-09-04 05:28 UTC
Requires
- php: >=7.4|^8.0
- ext-fileinfo: *
- ext-json: *
- ext-pcre: *
- composer/ca-bundle: ^1.3
- guzzlehttp/guzzle: ^7.0
- monolog/monolog: ^2.2|^3
- ramsey/uuid: ^3.9.7|^4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.13
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: 3.*
- symfony/var-dumper: ^5.4.9
- vlucas/phpdotenv: ^5.4
- dev-master
- 1.14.1
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.1
- 1.8.0
- 1.7.6
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- dev-develop
- dev-BA-494
- dev-update-version
- dev-BA-370-php-function-as-parameter-issue
- dev-BA-350-make-pushurl-optional
- dev-method-to-retrieve-hash
- dev-minor-fix
- dev-BA-278
- dev-BA-269
- dev-BA-276
- dev-update-readme
- dev-feature/BA-134
- dev-bugfix/sonarqube
- dev-actions
- dev-bugfix/push-url-in-batch
- dev-2.x-dev
- dev-bugfix/monolog-v3
This package is auto-updated.
Last update: 2024-09-04 05:28:50 UTC
README
Buckaroo PHP SDK
索引
关于
Buckaroo 是您所有在线支付的支付服务提供商,超过 30,000 家公司依赖 Buckaroo 的平台来安全处理他们的支付、订阅和未付款项。Buckaroo 开发了自己的 PHP SDK。该 SDK 是一个现代化的开源 PHP 库,使您的 PHP 应用程序轻松集成 Buckaroo 的服务。今天就开始使用 Buckaroo 接受支付。
要求
要使用 Buckaroo API 客户端,需要以下内容:
Composer 安装
安装 Buckaroo API 客户端最简单的方法是使用 Composer。
$ composer require buckaroo/sdk:^1.0
{
"require": {
"buckaroo/sdk": "^1.0"
}
}
示例
创建并配置 Buckaroo 对象。您可以在广场 WEBSITE_KEY 和 SECRET_KEY 中找到您的凭证。
require __DIR__ . '/vendor/autoload.php'; # Get your website & secret key in your plaza. # You can perform a test payment by giving the third param with the string "test", on default it is set on "test". # By changing the value of the third parameter to "live", a live transaction can be performed. $buckaroo = new \BuckarooClient('WEBSITE_KEY', 'SECRET_KEY', 'test');
创建具有所有可用支付方式的支付。在这个示例中,我们展示了如何创建信用卡支付。每种支付方式都有略微不同的有效负载。
# Create a new payment $buckaroo->method('creditcard') // Input the desire payment method. ->pay([ 'name' => 'visa', // Request to pay with Visa 'amountDebit' => 10, // The amount we want to charge 'invoice' => 'UNIQUE-INVOICE-NO', // Each payment must contain a unique invoice number ]);
创建交易后,您可以按需检索多个交易信息。
# Retrieve transaction information $transaction = $buckaroo->transaction('YOUR-TRANSACTION-KEY') $transaction->status(); // Retrieve transaction status $transaction->refundInfo(); // Retrieve refund info $transaction->cancelInfo() // Retrieve cancellation info
在我们的完整文档 docs.buckaroo.io 上找到更多信息。
贡献
我们非常感谢开发者为改进 Buckaroo 插件做出的贡献。如果您也想做出贡献,请遵循我们的 贡献指南。
版本控制
- 主要:需要额外测试/小心的破坏性更改
- 次要:不应产生重大影响的变化
- 补丁:仅包含错误和热修复
附加信息
- 支持:https://docs.buckaroo.io/docs/contact-us
- 联系:support@buckaroo.nl 或 +31 (0)30 711 50 50
许可证
Buckaroo PHP SDK 是开源软件,在 MIT 许可证 下授权。