Class PayPalCaptureAuthRequest
java.lang.Object
org.broadleafcommerce.vendor.paypal.service.payment.AbstractPayPalRequest<com.paypal.payments.Capture,com.paypal.payments.AuthorizationsCaptureRequest>
org.broadleafcommerce.vendor.paypal.service.payment.PayPalCaptureAuthRequest
- All Implemented Interfaces:
PayPalRequest
public class PayPalCaptureAuthRequest
extends AbstractPayPalRequest<com.paypal.payments.Capture,com.paypal.payments.AuthorizationsCaptureRequest>
Request object used to capture an authorization when doing auth immediately but delaying capture
until later (such as until after fulfillment). To capture the order immediately, use
PayPalCaptureOrderRequest.- Author:
- Nathan Moore
-
Constructor Summary
ConstructorsConstructorDescriptionPayPalCaptureAuthRequest(PayPalClientProvider clientProvider, org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest, com.paypal.payments.CaptureRequest captureRequest, String authId) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.paypal.payments.AuthorizationsCaptureRequestMethod to build outAbstractPayPalRequest.requestand provide it the implementation-specific configuration such as headers and request body.AbstractPayPalResponse<com.paypal.payments.Capture>Executes the configuredAbstractPayPalRequest.requestusing thePayPalHttpClient.protected Stringprotected com.paypal.payments.CaptureRequestprotected booleanImplementation specific determination of whether the request can be executed.Methods inherited from class org.broadleafcommerce.vendor.paypal.service.payment.AbstractPayPalRequest
configureRequest, execute, getClient, getClientProvider, getPaymentRequest, getRequest, isExecuted, isValid
-
Constructor Details
-
PayPalCaptureAuthRequest
public PayPalCaptureAuthRequest(PayPalClientProvider clientProvider, org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest, com.paypal.payments.CaptureRequest captureRequest, String authId)
-
-
Method Details
-
buildRequest
protected com.paypal.payments.AuthorizationsCaptureRequest buildRequest()Description copied from class:AbstractPayPalRequestMethod to build outAbstractPayPalRequest.requestand provide it the implementation-specific configuration such as headers and request body.- Specified by:
buildRequestin classAbstractPayPalRequest<com.paypal.payments.Capture,com.paypal.payments.AuthorizationsCaptureRequest> - Returns:
- The configured request
-
executeInternal
Description copied from class:AbstractPayPalRequestExecutes the configuredAbstractPayPalRequest.requestusing thePayPalHttpClient.- Specified by:
executeInternalin classAbstractPayPalRequest<com.paypal.payments.Capture,com.paypal.payments.AuthorizationsCaptureRequest> - Returns:
- The response from PayPal.
- Throws:
IOException- Thrown if the request execution fails.
-
isValidInternal
protected boolean isValidInternal()Description copied from class:AbstractPayPalRequestImplementation specific determination of whether the request can be executed.- Specified by:
isValidInternalin classAbstractPayPalRequest<com.paypal.payments.Capture,com.paypal.payments.AuthorizationsCaptureRequest> - Returns:
- Whether the request can be executed or is in an erroneous state.
-
getAuthId
-
getCaptureRequest
protected com.paypal.payments.CaptureRequest getCaptureRequest()
-