Class PayPalCaptureOrderRequest
java.lang.Object
org.broadleafcommerce.vendor.paypal.service.payment.AbstractPayPalRequest<com.paypal.orders.Order,com.paypal.orders.OrdersCaptureRequest>
org.broadleafcommerce.vendor.paypal.service.payment.PayPalCaptureOrderRequest
- All Implemented Interfaces:
PayPalRequest
public class PayPalCaptureOrderRequest
extends AbstractPayPalRequest<com.paypal.orders.Order,com.paypal.orders.OrdersCaptureRequest>
Request object used to capture an order immediately. To auth the order immediately but capture it
later, use
PayPalCaptureAuthRequest.- Author:
- Nathan Moore (nathandmoore)
-
Constructor Summary
ConstructorsConstructorDescriptionPayPalCaptureOrderRequest(PayPalClientProvider clientProvider, org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest, String orderId) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.paypal.orders.OrdersCaptureRequestMethod to build outAbstractPayPalRequest.requestand provide it the implementation-specific configuration such as headers and request body.protected AbstractPayPalResponse<com.paypal.orders.Order>Executes the configuredAbstractPayPalRequest.requestusing thePayPalHttpClient.protected Stringprotected 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
-
PayPalCaptureOrderRequest
public PayPalCaptureOrderRequest(PayPalClientProvider clientProvider, org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequest, String orderId)
-
-
Method Details
-
buildRequest
protected com.paypal.orders.OrdersCaptureRequest 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.orders.Order,com.paypal.orders.OrdersCaptureRequest> - Returns:
- The configured request
-
executeInternal
Description copied from class:AbstractPayPalRequestExecutes the configuredAbstractPayPalRequest.requestusing thePayPalHttpClient.- Specified by:
executeInternalin classAbstractPayPalRequest<com.paypal.orders.Order,com.paypal.orders.OrdersCaptureRequest> - 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.orders.Order,com.paypal.orders.OrdersCaptureRequest> - Returns:
- Whether the request can be executed or is in an erroneous state.
-
getOrderId
-