cbdesk / key-management_api
dev-master
2023-01-12 10:41 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-10-01 13:03:01 UTC
README
由于适用于我们欧盟/英国销售商的法规要求,对于某些API,开发者需要在相应的HTTP调用中添加数字签名。密钥管理API创建数字签名所需的密钥对,用于以下API:
- Finances API中的所有方法
- 履行API中的 issueRefund
- 交易API中的 GetAccount
- Post-Order API中的以下方法
- Issue Inquiry Refund
- Issue case refund
- Issue return refund
- 处理退货请求
- 批准取消请求
- 创建取消请求
此PHP包由Swagger Codegen项目自动生成
- API版本:v1.0.0
- 包版本:1.0.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
需求
PHP 5.5及以上版本
安装和用法
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/cbdesk/key-management_api.git"
}
],
"require": {
"cbdesk/key-management_api": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请遵循安装程序,然后运行以下操作
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: api_auth $config = Cbdesk\EbayKeyManagment\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Cbdesk\EbayKeyManagment\Api\Api\SigningKeyApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Cbdesk\EbayKeyManagment\Api\Model\CreateSigningKeyRequest(); // \Cbdesk\EbayKeyManagment\Api\Model\CreateSigningKeyRequest | try { $result = $apiInstance->createSigningKey($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling SigningKeyApi->createSigningKey: ', $e->getMessage(), PHP_EOL; } // Configure OAuth2 access token for authorization: api_auth $config = Cbdesk\EbayKeyManagment\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Cbdesk\EbayKeyManagment\Api\Api\SigningKeyApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $signing_key_id = "signing_key_id_example"; // string | The system-generated eBay ID of the keypairs being requested. try { $result = $apiInstance->getSigningKey($signing_key_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling SigningKeyApi->getSigningKey: ', $e->getMessage(), PHP_EOL; } // Configure OAuth2 access token for authorization: api_auth $config = Cbdesk\EbayKeyManagment\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Cbdesk\EbayKeyManagment\Api\Api\SigningKeyApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $result = $apiInstance->getSigningKeys(); print_r($result); } catch (Exception $e) { echo 'Exception when calling SigningKeyApi->getSigningKeys: ', $e->getMessage(), PHP_EOL; } ?>
API端点的文档
所有URI相对于https://apiz.ebay.com{basePath}
模型的文档
授权的文档
api_auth
- 类型:OAuth
- 流程:应用
- 授权URL:
- 作用域:
- https://api.ebay.com/oauth/api_scope:查看eBay的公共数据