mobuygmbh / mobuy-api-client-php
mobuy Payment 的 PHP API 客户端(由 Swagger 生成)
1.0.0
2017-08-11 14:44 UTC
Requires
- php: >=5.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-29 04:42:50 UTC
README
未提供描述(由 Swagger Codegen 生成 https://github.com/swagger-api/swagger-codegen)
此 PHP 包由 Swagger Codegen 项目自动生成
- API 版本:v1
- 构建包:io.swagger.codegen.languages.PhpClientCodegen
要求
PHP 5.4.0 及更高版本
安装与使用
Composer
要使用 Composer 安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com//.git"
}
],
"require": {
"/": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请遵循 安装过程,然后运行以下操作
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: apiKey Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $api_instance = new Swagger\Client\Api\OrderApi(); $order_payload = new \Swagger\Client\Model\OrderPayload(); // \Swagger\Client\Model\OrderPayload | Order payload try { $result = $api_instance->createOrder($order_payload); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderApi->createOrder: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都是相对于 https://
模型文档
- 错误
- InlineResponse200
- InlineResponse2001
- InlineResponse201
- InlineResponse400
- InlineResponse401
- NewOrder
- Order
- OrderPayload
- Payment
- Transaction
- ValidationError
授权文档
apiKey
- 类型:API 密钥
- API 密钥参数名:Authorization
- 位置:HTTP 头部