Interface PaymentRefundService
- 
- All Known Implementing Classes:
 DefaultPaymentRefundService
public interface PaymentRefundServiceA service responsible for issuing refunds for anOrder's payments.- Author:
 - Samarth Dhruva (samarthd)
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<TransactionExecutionResponse>refundAndCompletePendingReturnConfirmations(com.broadleafcommerce.order.client.domain.Order order, List<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillments, com.broadleafcommerce.order.client.domain.ReturnAuthorization returnAuthWithPendingConfirmations, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Finds all pendingReturnConfirmationson the givenReturnAuthorization(forReturnAuthorizationItemswhoseReturnAuthorizationItem.getReturnType()supports refunds), issues refunds for them, and marks them as completed.List<TransactionExecutionResponse>refundFulfillment(javax.money.MonetaryAmount amountToRefund, com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Issues refund(s) for the given amount for theOrderFulfillment. 
 - 
 
- 
- 
Method Detail
- 
refundAndCompletePendingReturnConfirmations
List<TransactionExecutionResponse> refundAndCompletePendingReturnConfirmations(com.broadleafcommerce.order.client.domain.Order order, List<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillments, com.broadleafcommerce.order.client.domain.ReturnAuthorization returnAuthWithPendingConfirmations, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds all pendingReturnConfirmationson the givenReturnAuthorization(forReturnAuthorizationItemswhoseReturnAuthorizationItem.getReturnType()supports refunds), issues refunds for them, and marks them as completed.- Parameters:
 order- the order for which the refunds need to be issuedorderFulfillments- the list of all of the order's fulfillmentsreturnAuthWithPendingConfirmations- the return authorization containing pending confirmations that need to be refunded and completedcontextInfo- context information surrounding multitenant state- Returns:
 - the updated order, or 
nullif there were no pending return confirmations on the return authorization - Throws:
 PaymentRefundException- if there was an error processing the refund(s)
 
- 
refundFulfillment
List<TransactionExecutionResponse> refundFulfillment(javax.money.MonetaryAmount amountToRefund, com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Issues refund(s) for the given amount for theOrderFulfillment.- Parameters:
 amountToRefund- the amount to refundorder- the order for which the refund(s) need to be issuedfulfillment- the fulfillment to refundcontextInfo- context information surrounding multitenant state- Returns:
 - the updated order
 - Throws:
 PaymentRefundException- if there was an error processing the refund(s)
 
 - 
 
 -