Overview
  • Namespace
  • Class

Namespaces

  • PayPal
    • Api
    • Auth
    • Cache
    • Common
    • Converter
    • Core
    • Exception
    • Handler
    • Log
    • Rest
    • Security
    • Transport
    • Validation

Classes

  • OAuthTokenCredential

Class OAuthTokenCredential

Class OAuthTokenCredential

PayPal\Common\PayPalModel
Extended by PayPal\Common\PayPalResourceModel implements PayPal\Rest\IResource
Extended by PayPal\Auth\OAuthTokenCredential
Namespace: PayPal\Auth
Located at PayPal/Auth/OAuthTokenCredential.php

Methods summary

public
# __construct( string $clientId, string $clientSecret )

Construct

Construct

Parameters

$clientId
client id obtained from the developer portal
$clientSecret
client secret obtained from the developer portal

Throws

InvalidArgumentException

Overrides

PayPal\Common\PayPalModel::__construct
public string
# getClientId( )

Get Client ID

Get Client ID

Returns

string
public string
# getClientSecret( )

Get Client Secret

Get Client Secret

Returns

string
public null|string
# getAccessToken( $config )

Get AccessToken

Get AccessToken

Parameters

$config

Returns

null|string
public string|null
# getRefreshToken( $config, $authorizationCode = null, array $params = array() )

Get a Refresh Token from Authorization Code

Get a Refresh Token from Authorization Code

Parameters

$config
$authorizationCode
$params
optional arrays to override defaults

Returns

string|null
public string
# updateAccessToken( array $config, string|null $refreshToken = null )

Updates Access Token based on given input

Updates Access Token based on given input

Parameters

$config
$refreshToken

Returns

string

Overrides

PayPal\Common\PayPalResourceModel::updateAccessToken
protected mixed
# getToken( array $config, string $clientId, string $clientSecret, string $payload )

Retrieves the token based on the input configuration

Retrieves the token based on the input configuration

Parameters

$config
$clientId
$clientSecret
$payload

Returns

mixed

Throws

PayPal\Exception\PayPalConfigurationException
PayPal\Exception\PayPalConnectionException
public string
# encrypt( $data )

Helper method to encrypt data using clientSecret as key

Helper method to encrypt data using clientSecret as key

Parameters

$data

Returns

string
public string
# decrypt( $data )

Helper method to decrypt data using clientSecret as key

Helper method to decrypt data using clientSecret as key

Parameters

$data

Returns

string

Methods inherited from PayPal\Common\PayPalResourceModel

addLink(), executeCall(), getLink(), getLinks(), removeLink(), setLinks()

Methods inherited from PayPal\Common\PayPalModel

__get(), __isset(), __set(), __toString(), __unset(), fromArray(), fromJson(), getList(), setCredential(), toArray(), toJSON()

Properties summary

public static string $CACHE_PATH
# '/../../../var/auth.cache'
public static string $AUTH_HANDLER

Default Auth Handler

Default Auth Handler

# 'PayPal\Handler\OauthHandler'
public static integer $expiryBufferTime

Private Variable

Private Variable

# 120

Properties inherited from PayPal\Common\PayPalModel

$credential

API documentation generated by ApiGen