我已经通过调用\PayPal\Api\OpenIdUserinfo::getUserinfo()
获得了PayPal凭据,并试图查看它们是否有效,但是此方法采用了一个$params
变量,其值为访问令牌。
要获取访问令牌,我正在调用OpenIdTokeninfo::createFromAuthorizationCode()
,该变量带有一个$params
变量。
$params
的评论是
$params (allowed values are client_id, client_secret, grant_type, code and redirect_uri)(required) client_id from developer portal
(required) client_secret from developer portal
(required) code is Authorization code previously received from the authorization server
(required) redirect_uri Redirection endpoint that must match the one provided during the authorization request that ended in receiving the authorization code.
我不知道如何获得code
。
我所拥有的只是client_id和密码。如何获得code
或如何检查client_id和secret是否有效?