Interface NDCPaymentService
- All Known Implementing Classes:
DefaultNDCPaymentService
public interface NDCPaymentService
Interface exposing methods involved in handling payment information and payment transactions of a given order
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreatePaymentTransaction(AbstractOrderModel order, List<AbstractOrderEntryModel> orderEntries, BigDecimal paymentInfoAmount, boolean isPayLater) Create payment transactions from ndc offer data list.booleanChecks if there is at least one order entries in the order which has been not associated to any payment transaction.booleanVerifies if order the contains payment transactions.voidvalidatePaymentTimeLimit(List<AbstractOrderEntryModel> orderEntries) Validate payment time limit.voidvalidateTotalOrderAmountAgainstPaymentInfo(AbstractOrderModel order, BigDecimal totalPaymentInfoAmount) Validates the total amount of the order against the paymentInfos.
-
Method Details
-
createPaymentTransaction
void createPaymentTransaction(AbstractOrderModel order, List<AbstractOrderEntryModel> orderEntries, BigDecimal paymentInfoAmount, boolean isPayLater) throws NDCException Create payment transactions from ndc offer data list.- Parameters:
order- the orderorderEntries- the order entriespaymentInfoAmount- the payment info amountisPayLater- true if orderCreate RQ does not have any payment info.- Throws:
NDCException- the ndc exception
-
isOriginalOrderPaid
Verifies if order the contains payment transactions. If yes, the order has already been payed.- Parameters:
order- the order- Returns:
- true if the list of payment transaction is not empty.
-
validateTotalOrderAmountAgainstPaymentInfo
void validateTotalOrderAmountAgainstPaymentInfo(AbstractOrderModel order, BigDecimal totalPaymentInfoAmount) throws NDCException Validates the total amount of the order against the paymentInfos. Checks if there are orderEntries that are not linked to any paymentTransactions.- Parameters:
order- the ordertotalPaymentInfoAmount- the totalPaymentInfoAmount- Throws:
NDCException- the ndc exception
-
isAnyOrderEntryWithoutPaymentTransaction
Checks if there is at least one order entries in the order which has been not associated to any payment transaction.- Parameters:
order- the order- Returns:
- true if the order contains any order entries with no payment transaction.
-
validatePaymentTimeLimit
Validate payment time limit.- Parameters:
orderEntries- the order entries- Throws:
NDCException- the ndc exception
-