neilcrookes/oauth2-ebay
Composer 安装命令:
composer require neilcrookes/oauth2-ebay
包简介
eBay OAuth 2.0 Client Provider for The PHP League OAuth2-Client
关键字:
README 文档
README
This package provides Ebay OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Installation
To install, use composer:
composer require neilcrookes/oauth2-ebay
Usage
Usage is the same as The League's OAuth client, using NeilCrookes\OAuth2\Client\Provider\Ebay as the provider.
$provider = new \NeilCrookes\OAuth2\Client\Provider\Ebay([
'clientId' => 'YOUR EBAY APP ID',
'clientSecret' => 'YOUR EBAY CERTIFICATE ID',
'redirectUri' => 'YOUR EBAY "RU" NAME',
'sandbox' => true, //defaults to false, i.e. production
'http_errors' => false, // Optional. Means Guzzle Exceptions aren't thrown on 4xx or 5xx responses from eBay, allowing you to detect and handle them yourself
], [
'optionProvider' => new \League\OAuth2\Client\OptionProvider\HttpBasicAuthOptionProvider()
]);
$accessToken = $provider->getAccessToken('authorization_code', [
'code' => $_GET['code']
]);
$ebayUser = $provider->getResourceOwner($accessToken);
echo $ebayUser->getId(); // eBay User's user id
echo $ebayUser->getEmail(); // eBay User's email address
统计信息
- 总下载量: 102.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-28