Class AbstractPayPalRequest<RES,​REQ extends com.paypal.http.HttpRequest<RES>>

    • Constructor Detail

      • AbstractPayPalRequest

        public AbstractPayPalRequest​(@NonNull
                                     @NonNull PayPalClientProvider clientProvider,
                                     @NonNull
                                     @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • Method Detail

      • isValid

        protected boolean isValid()
        Whether this is configured correctly and can execute the request. Relies upon isValidInternal() and whether the request has already been executed.
        Returns:
        Whether this is configured correctly and can execute the request.
      • configureRequest

        protected void configureRequest​(@NonNull
                                        @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
        Configures request with content and headers. Defers to buildRequest() for most of the work.
      • buildRequest

        protected abstract REQ buildRequest()
        Method to build out request and provide it the implementation-specific configuration such as headers and request body.
        Returns:
        The configured request
      • isValidInternal

        protected abstract boolean isValidInternal()
        Implementation specific determination of whether the request can be executed.
        Returns:
        Whether the request can be executed or is in an erroneous state.
      • getPaymentRequest

        protected com.broadleafcommerce.paymentgateway.domain.PaymentRequest getPaymentRequest()
      • getRequest

        protected REQ getRequest()
        The HttpRequest that is built to facilitate executing request.
      • isExecuted

        protected boolean isExecuted()
        Whether the request has been executed.