Laravel 5.4:如何检查给定的PayPal凭证是否有效?

时间:2018-07-21 00:35:43

标签: php laravel paypal sdk laravel-5.4

我已经通过调用\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是否有效?

0 个答案:

没有答案