Interface PayPalApiProvider
- 
- All Known Implementing Classes:
 ExternalPayPalApiProvider
public interface PayPalApiProviderProvider for interfacing with operations utilizing aWebClientto make requests to an external REST API.- Author:
 - Dima Myroniuk (dmyroniuk)
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OrderauthorizePaymentForOrder(@NonNull String orderId, @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, OrderAuthorizeRequest request, String applicationId, String tenantId)Authorizes payment for an order.CapturecaptureAuthorizedPayment(@NonNull String authorizationId, @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @NonNull CaptureRequest request, String applicationId, String tenantId)Captures an authorized payment, by ID.OrdercapturePaymentForOrder(@NonNull String orderId, @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, OrderCaptureRequest request, String applicationId, String tenantId)Captures payment for an order.OrdercreateOrder(@NonNull OrderRequest request, @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, String applicationId, String tenantId)Create the payment order.RefundrefundCapturedPayment(@NonNull String captureId, @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @NonNull RefundRequest request, String applicationId, String tenantId)Refunds a captured payment, by ID.AuthorizationretrieveAuthorizationDetails(@NonNull String authorizationId, String applicationId, String tenantId)Retrieve the details for an authorized payment, by ID.OrderretrieveOrderDetails(@NonNull String orderId, @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, String applicationId, String tenantId)Retrieve the details for an order, by ID.VoidupdateOrder(@NonNull String orderId, @NonNull List<Patch> patches, @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, String applicationId, String tenantId)Update the payment order.VoidvoidAuthorizedPayment(@NonNull String authorizationId, @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, String applicationId, String tenantId)Voids, or cancels, an authorized payment, by ID. 
 - 
 
- 
- 
Method Detail
- 
retrieveOrderDetails
Order retrieveOrderDetails(@NonNull @NonNull String orderId, @NonNull @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @Nullable String applicationId, @Nullable String tenantId)
Retrieve the details for an order, by ID.- Parameters:
 orderId- the order idheadersConsumer- the headers consumerapplicationId- the application idtenantId- the tenant id- Returns:
 - the details for an order, by ID.
 
 
- 
createOrder
Order createOrder(@NonNull @NonNull OrderRequest request, @NonNull @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @Nullable String applicationId, @Nullable String tenantId)
Create the payment order.- Parameters:
 request- the request to create the orderheadersConsumer- the headers consumerapplicationId- the application idtenantId- the tenant id- Returns:
 - the created order
 
 
- 
updateOrder
Void updateOrder(@NonNull @NonNull String orderId, @NonNull @NonNull List<Patch> patches, @NonNull @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @Nullable String applicationId, @Nullable String tenantId)
Update the payment order.- Parameters:
 orderId- the order id to updatepatches- an array of JSON patch objects to apply partial updates to resources.headersConsumer- the headers consumerapplicationId- the application idtenantId- the tenant id
 
- 
authorizePaymentForOrder
Order authorizePaymentForOrder(@NonNull @NonNull String orderId, @NonNull @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @Nullable OrderAuthorizeRequest request, @Nullable String applicationId, @Nullable String tenantId)
Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.- Parameters:
 orderId- the order idheadersConsumer- the headers consumerrequest- the request to authorize the paymentapplicationId- the application idtenantId- the tenant id- Returns:
 - response body that shows authorized payment details
 
 
- 
capturePaymentForOrder
Order capturePaymentForOrder(@NonNull @NonNull String orderId, @NonNull @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @Nullable OrderCaptureRequest request, @Nullable String applicationId, @Nullable String tenantId)
Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.- Parameters:
 orderId- the order idheadersConsumer- the headers consumerrequest- the request to capture the paymentapplicationId- the application idtenantId- the tenant id- Returns:
 - response body that shows captured payment details
 
 
- 
retrieveAuthorizationDetails
Authorization retrieveAuthorizationDetails(@NonNull @NonNull String authorizationId, @Nullable String applicationId, @Nullable String tenantId)
Retrieve the details for an authorized payment, by ID.- Parameters:
 authorizationId- the ID of the authorized payment for which to show details.applicationId- the application idtenantId- the tenant id- Returns:
 - response body that shows authorization details.
 
 
- 
captureAuthorizedPayment
Capture captureAuthorizedPayment(@NonNull @NonNull String authorizationId, @NonNull @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @NonNull @NonNull CaptureRequest request, @Nullable String applicationId, @Nullable String tenantId)
Captures an authorized payment, by ID.- Parameters:
 authorizationId- The PayPal-generated ID for the authorized payment to capture.headersConsumer- the headers consumerrequest- the request to capture the authorized paymentapplicationId- the application idtenantId- the tenant id- Returns:
 - response body that shows captured payment details
 
 
- 
voidAuthorizedPayment
Void voidAuthorizedPayment(@NonNull @NonNull String authorizationId, @NonNull @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @Nullable String applicationId, @Nullable String tenantId)
Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured.- Parameters:
 authorizationId- The PayPal-generated ID for the authorized payment to void.headersConsumer- the headers consumerapplicationId- the application idtenantId- the tenant id
 
- 
refundCapturedPayment
Refund refundCapturedPayment(@NonNull @NonNull String captureId, @NonNull @NonNull Consumer<org.springframework.http.HttpHeaders> headersConsumer, @NonNull @NonNull RefundRequest request, @Nullable String applicationId, @Nullable String tenantId)
Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.- Parameters:
 captureId- The PayPal-generated ID for the captured payment to refund.headersConsumer- the headers consumerrequest- the request to refund the captured paymentapplicationId- the application idtenantId- the application id- Returns:
 - response body that shows refund details
 
 
 - 
 
 -