PHP Класс PayPal\Api\OpenIdSession

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getAuthorizationUrl ( string $redirectUri, array $scope, string $clientId, null $nonce = null, null $state = null, ApiContext $apiContext = null ) : string Returns the PayPal URL to which the user must be redirected to start the authentication / authorization process.
getLogoutUrl ( string $redirectUri, string $idToken, ApiContext $apiContext = null ) : string Returns the URL to which the user must be redirected to logout from the OpenID provider (i.e. PayPal)

Приватные методы

Метод Описание
getBaseUrl ( $config ) : null | string Gets the base URL for the Redirect URI

Описание методов

getAuthorizationUrl() публичный статический Метод

Returns the PayPal URL to which the user must be redirected to start the authentication / authorization process.
public static getAuthorizationUrl ( string $redirectUri, array $scope, string $clientId, null $nonce = null, null $state = null, ApiContext $apiContext = null ) : string
$redirectUri string Uri on merchant website to where the user must be redirected to post paypal login
$scope array The access privilges that you are requesting for from the user. Pass empty array for all scopes.
$clientId string client id from developer portal See https://developer.paypal.com/webapps/developer/docs/integration/direct/log-in-with-paypal/detailed/#attributes for more
$nonce null
$state null
$apiContext PayPal\Rest\ApiContext Optional API Context
Результат string Authorization URL

getLogoutUrl() публичный статический Метод

Returns the URL to which the user must be redirected to logout from the OpenID provider (i.e. PayPal)
public static getLogoutUrl ( string $redirectUri, string $idToken, ApiContext $apiContext = null ) : string
$redirectUri string Uri on merchant website to where the user must be redirected to post logout
$idToken string id_token from the TokenInfo object
$apiContext PayPal\Rest\ApiContext Optional API Context
Результат string logout URL