public class PayPalPlusAuthorizationServiceImpl extends java.lang.Object implements PayPalPlusAuthorizationService
Modifier and Type | Field and Description |
---|---|
private com.google.common.cache.LoadingCache<PayPalPlusCredentials,PayPalPlusRequestContext> |
cache |
private PayPalPlusConfig |
config |
private AccessTokenServiceFactory |
tokenServiceFactory |
Constructor and Description |
---|
PayPalPlusAuthorizationServiceImpl(com.google.common.cache.LoadingCache<PayPalPlusCredentials,PayPalPlusRequestContext> cache,
PayPalPlusConfig config,
AccessTokenServiceFactory tokenServiceFactory) |
Modifier and Type | Method and Description |
---|---|
PayPalPlusRequestContext |
createAuthorization(PayPalPlusCredentials credentials)
Creates a new request context in order to do authorued calls
against the paypal-API.
|
private java.util.Map<java.lang.String,java.lang.String> |
createHttpConfiguration(PayPalPlusCredentials credentials) |
private PayPalPlusRequestContext |
createRequestContext(java.lang.String accessToken,
PayPalPlusCredentials credentials) |
PayPalPlusRequestContext |
getAuthorization(PayPalPlusCredentials credentials)
Provides a request context in order to do authorized calls
against the paypal-API.
|
private final com.google.common.cache.LoadingCache<PayPalPlusCredentials,PayPalPlusRequestContext> cache
private final PayPalPlusConfig config
private final AccessTokenServiceFactory tokenServiceFactory
@Inject public PayPalPlusAuthorizationServiceImpl(com.google.common.cache.LoadingCache<PayPalPlusCredentials,PayPalPlusRequestContext> cache, PayPalPlusConfig config, AccessTokenServiceFactory tokenServiceFactory)
@Nullable public PayPalPlusRequestContext getAuthorization(PayPalPlusCredentials credentials)
PayPalPlusAuthorizationService
getAuthorization
in interface PayPalPlusAuthorizationService
credentials
- Credentials used to obtain an access token.@Nullable public PayPalPlusRequestContext createAuthorization(PayPalPlusCredentials credentials)
PayPalPlusAuthorizationService
createAuthorization
in interface PayPalPlusAuthorizationService
credentials
- Credentials used to obtain an access token.private PayPalPlusRequestContext createRequestContext(java.lang.String accessToken, PayPalPlusCredentials credentials)
private java.util.Map<java.lang.String,java.lang.String> createHttpConfiguration(PayPalPlusCredentials credentials)