Interface PayPalClientProvider
-
- All Known Implementing Classes:
DefaultPayPalClientProvider
public interface PayPalClientProvider
Identifies a service that configures and provides access to aPayPalHttpClient
with which to execute requests based onPayPalCheckoutApiProperties
. It also provides common configuration for outgoingPayPal HttpRequests
.- Author:
- Nathan Moore (nathandmoore)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
configureRequest(com.paypal.http.HttpRequest<?> request, com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
Configures thePayPal request
based on thePaymentRequest
.default com.paypal.core.PayPalHttpClient
getClient()
Deprecated.in favour ofgetClient(String, String)
com.paypal.core.PayPalHttpClient
getClient(String applicationId, String tenantId)
Returns thePayPalHttpClient
for the specified tenant and application ids.
-
-
-
Method Detail
-
getClient
@Deprecated(since="1.2.0") default com.paypal.core.PayPalHttpClient getClient()
Deprecated.in favour ofgetClient(String, String)
Returns the configuredPayPalHttpClient
.- Returns:
- the configured
PayPalHttpClient
.
-
getClient
com.paypal.core.PayPalHttpClient getClient(@Nullable String applicationId, @Nullable String tenantId)
Returns thePayPalHttpClient
for the specified tenant and application ids.- Parameters:
applicationId
- the application IDtenantId
- the tenant ID- Returns:
- the configured
PayPalHttpClient
.
-
configureRequest
void configureRequest(com.paypal.http.HttpRequest<?> request, com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
Configures thePayPal request
based on thePaymentRequest
. This will add the request ID and various headers common to all requests.- Parameters:
request
- TheHttpRequest
to configurepaymentRequest
- ThePaymentRequest
sent to the gateway
-
-