macropage / sdk-ebay-rest-fulfillment
使用 Fulfillment API 根据结账时指定的支付方式和时间,代表卖家完成包装、地址、处理和发货的每个订单过程。
dev-master
2020-03-17 09:34 UTC
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-08-29 05:24:46 UTC
README
使用 Fulfillment API 根据结账时指定的支付方式和时间,代表卖家完成包装、地址、处理和发货的每个订单过程。
此 PHP 包由 OpenAPI Generator 项目自动生成
- API 版本:1.11.1
- 包版本:2.3.2
- 构建包:org.openapitools.codegen.languages.PhpClientCodegen
要求
PHP 5.5 及以上
安装与使用
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/macropage/sdk-ebay-rest-fulfillment.git"
}
],
"require": {
"macropage/sdk-ebay-rest-fulfillment": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/sdk-ebay-rest-fulfillment/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照 安装程序 进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: api_auth $config = macropage\SDKs\ebay\rest\fulfillment\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new macropage\SDKs\ebay\rest\fulfillment\Api\OrderApi( // 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 ); $orderId = 'orderId_example'; // string | The unique identifier of the order. Order ID values are shown in My eBay/Seller Hub, and are also returned by the getOrders method in the orders.orderId field. Note: A new order ID format was introduced to all eBay APIs (legacy and REST) in June 2019. In REST APIs that return Order IDs, including the Fulfillment API, all order IDs are returned in the new format, but the getOrder method will accept both the legacy and new format order ID. The new format is a non-parsable string, globally unique across all eBay marketplaces, and consistent for both single line item and multiple line item orders. These order identifiers will be automatically generated after buyer payment, and unlike in the past, instead of just being known and exposed to the seller, these unique order identifiers will also be known and used/referenced by the buyer and eBay customer support. try { $result = $apiInstance->getOrder($orderId); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderApi->getOrder: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://api.ebay.com/sell/fulfillment/v1
模型文档
- 地址
- 金额
- 应用促销
- 买家
- 取消请求
- 取消状态
- 配送成本
- 争议证据
- 争议摘要响应
- EbayCollectAndRemitTax
- 错误
- 错误参数
- 证据请求
- 扩展联系人
- 文件信息
- 履行开始指令
- 礼物详情
- 买家信息
- 退款请求
- 旧参考
- 行项目
- 行项目履行指令
- 行项目属性
- 行项目参考
- 行项目退款
- 订单
- 订单行项目
- 订单退款
- 订单搜索分页集合
- 支付
- 支付争议
- 支付争议活动
- 支付争议活动历史
- 支付争议结果详情
- 支付争议摘要
- 支付保留
- 支付摘要
- 电话号码
- 取货步骤
- 定价摘要
- 退款
- 退款项
- 卖家释放操作
- 配送履行
- 配送履行详情
- 配送履行分页集合
- 配送步骤
- 简单金额
- 税收
- 跟踪信息
授权文档
api_auth
- 类型: OAuth
- 流程: accessCode
- 授权 URL: https://auth.ebay.com/oauth2/authorize
- 作用域:
- https://api.ebay.com/oauth/api_scope/sell.fulfillment: 查看和管理您的订单履行
- https://api.ebay.com/oauth/api_scope/sell.finances: 查看和管理您的支付和订单信息以显示此信息,并允许您使用第三方应用程序发起退款
- https://api.ebay.com/oauth/api_scope/sell.payment.dispute: 查看和管理争议及其相关详细信息(包括支付和订单信息)。
- https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly: 查看您的订单履行