Interface PaymentPriorityStrategy
-
- All Known Implementing Classes:
DefaultPaymentPriorityStrategy
public interface PaymentPriorityStrategy
A helper component that has understanding of whichPaymentSummaries
take precedence and should be applied first in various operations such as payment authorize.- Author:
- Samarth Dhruva (samarthd), Sunny Yu
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<PaymentSummary>
sortByPaymentGatewayPriority(List<PaymentSummary> payments, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Given a list ofPaymentSummaries
, sorts them in order of which should be executed first based onPaymentSummary.getGatewayType()
.
-
-
-
Method Detail
-
sortByPaymentGatewayPriority
List<PaymentSummary> sortByPaymentGatewayPriority(@Nullable List<PaymentSummary> payments, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Given a list ofPaymentSummaries
, sorts them in order of which should be executed first based onPaymentSummary.getGatewayType()
.- Parameters:
payments
- the payments to sort- Returns:
- a new list representing the sorted result. Will be empty if
payments
is null or empty.
-
-