dojo-engineering / dojo-php
官方 Dojo PHP 库,支持 PHP 7.4+
v1.1.0
2023-12-06 10:07 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2024-09-26 14:44:31 UTC
README
安装
使用 Composer 安装 Dojo PHP 库
composer require dojo-engineering/dojo-php
构建源代码
为了构建,需要 PHP 7.4+。或者使用 VSCode devcontainer。执行以下步骤
- 运行
composer install
- 从仓库根目录运行(具有
execute权限)
./build/generate-openapi.sh
- 将所有文件从
/generated/src复制到/src
文档
有关示例的完整列表,请查看 API 文档.
用法
use Dojo_PHP\ApiFactory; $apiKey = "YOUR_API_KEY"; $apiPaymentIntent = ApiFactory::createPaymentIntentApi($apiKey); $req = new CreatePaymentIntentRequest(); $req->setReference("test"); $money = new Money(); $money->setValue(100); $money->setCurrencyCode("GBP"); $req->setAmount($money); $pi = $apiPaymentIntent->paymentIntentsCreatePaymentIntent(\Dojo_PHP\API_VERSION, $req);
对于任何请求、错误或评论,请 提交一个问题 或 提交一个拉取请求。您也可以在我们的 Discord 服务器 上联系我们。