Interface PayPalClientProvider

  • All Known Implementing Classes:
    DefaultPayPalClientProvider

    public interface PayPalClientProvider
    Identifies a service that configures and provides access to a PayPalHttpClient with which to execute requests based on PayPalCheckoutApiProperties. It also provides common configuration for outgoing PayPal HttpRequests.
    Author:
    Nathan Moore (nathandmoore)
    • Method Detail

      • getClient

        @Deprecated(since="1.2.0")
        default com.paypal.core.PayPalHttpClient getClient()
        Deprecated.
        Returns the configured PayPalHttpClient.
        Returns:
        the configured PayPalHttpClient.
      • getClient

        com.paypal.core.PayPalHttpClient getClient​(@Nullable
                                                   String applicationId,
                                                   @Nullable
                                                   String tenantId)
        Returns the PayPalHttpClient for the specified tenant and application ids.
        Parameters:
        applicationId - the application ID
        tenantId - the tenant ID
        Returns:
        the configured PayPalHttpClient.
      • configureRequest

        void configureRequest​(com.paypal.http.HttpRequest<?> request,
                              com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
        Configures the PayPal request based on the PaymentRequest. This will add the request ID and various headers common to all requests.
        Parameters:
        request - The HttpRequest to configure
        paymentRequest - The PaymentRequest sent to the gateway