@Service(value="blPayPalClientProvider") public class PayPalClientProviderImpl extends Object implements PayPalClientProvider
| Modifier and Type | Field and Description |
|---|---|
protected PayPalCheckoutConfiguration |
configuration |
| Constructor and Description |
|---|
PayPalClientProviderImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildIdempotencyKey(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
Builds or gathers the idempotencyKey for the request.
|
void |
configureRequest(com.paypal.http.HttpRequest<?> request,
org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
Configures the
PayPal request based on the PaymentRequestDTO. |
com.paypal.core.PayPalHttpClient |
getClient()
Returns the configured
PayPalHttpClient. |
void |
init() |
protected PayPalCheckoutConfiguration configuration
@PostConstruct public void init()
public void configureRequest(com.paypal.http.HttpRequest<?> request,
org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
PayPalClientProviderPayPal request based on the PaymentRequestDTO. This
will add the request ID and various headers common to all requests.configureRequest in interface PayPalClientProviderrequest - The HttpRequest to configurepaymentRequest - The PaymentRequestDTO sent to the gatewayprotected String buildIdempotencyKey(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest)
Note: this value must be unique for each transaction type. For example, if we
want to authorize & later capture a PayPal Order, the capture request's idempotency
key must be different than the authorization request's idempotency key.paymentRequest - the request that will be sent to PayPalpublic com.paypal.core.PayPalHttpClient getClient()
PayPalClientProviderPayPalHttpClient.getClient in interface PayPalClientProviderPayPalHttpClient.Copyright © 2021. All rights reserved.