Interface PayPalCheckoutProvider

  • All Known Implementing Classes:
    DefaultPayPalCheckoutProvider

    public interface PayPalCheckoutProvider
    Identifies a service that is responsible for making calls against the PayPal REST API.
    Author:
    Elbert Bautista (elbertbautista)
    • Method Detail

      • call

        <T extends PayPalResponse> T call​(PayPalRequest paymentRequest,
                                          Class<T> responseType)
        Makes a request to PayPal
        Parameters:
        paymentRequest - The payment request that should be executed. The operation that is executed is dependent on which implementation of PayPalRequest is sent
        responseType - The type of the response expected
        Returns:
        the respective PayPalResponse that corresponds to the given responseType
        Throws:
        com.broadleafcommerce.paymentgateway.service.exception.PaymentException - if the PayPalRequest returns an exception once executed. This could be because the initial request is configured invalidly or because the PayPal APIs responded with an error.