Interface PaymentCaptureService
-
- All Known Implementing Classes:
DefaultPaymentCaptureService
public interface PaymentCaptureService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<TransactionExecutionResponse>captureFulfillment(@NonNull javax.money.MonetaryAmount amountToCapture, @NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Responsible for capturing an amount from theOrder'spaymentsdefault List<TransactionExecutionResponse>captureFulfillmentTotal(@NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Responsible for capturing theOrderFulfillment.getGrandTotal()from theOrder'spayments
-
-
-
Method Detail
-
captureFulfillment
List<TransactionExecutionResponse> captureFulfillment(@NonNull @NonNull javax.money.MonetaryAmount amountToCapture, @NonNull @NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull @NonNull com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Responsible for capturing an amount from theOrder'spayments- Parameters:
amountToCapture- The amount to capture for theOrderFulfillmentorder- The order whose payments should be used to captured the specified amountfulfillment- The fulfillment to capture payment forcontextInfo- Context information around sandbox and multitenant state.- Returns:
- the
TransactionExecutionResponsesfor all the capture transactions - Throws:
PaymentCaptureException- If the totalToCapture is too high and cannot be handled by the order's paymentsPaymentTransactionFailureException- If a payment capture transaction fails
-
captureFulfillmentTotal
default List<TransactionExecutionResponse> captureFulfillmentTotal(@NonNull @NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull @NonNull com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Responsible for capturing theOrderFulfillment.getGrandTotal()from theOrder'spayments- Parameters:
order- The order whose payments should be used to captured the specified amountfulfillment- The fulfillment to capture payment forcontextInfo- Context information around sandbox and multitenant state.- Returns:
- the
TransactionExecutionResponsesfor all the capture transactions - Throws:
PaymentCaptureException- If the totalToCapture is too high and cannot be handled by the order's paymentsPaymentTransactionFailureException- If a payment capture transaction fails
-
-