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 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 order
      orderEntries - the order entries
      paymentInfoAmount - the payment info amount
      isPayLater - true if orderCreate RQ does not have any payment info.
      Throws:
      NDCException - the ndc exception
    • isOriginalOrderPaid

      boolean isOriginalOrderPaid(AbstractOrderModel order)
      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 order
      totalPaymentInfoAmount - the totalPaymentInfoAmount
      Throws:
      NDCException - the ndc exception
    • isAnyOrderEntryWithoutPaymentTransaction

      boolean isAnyOrderEntryWithoutPaymentTransaction(AbstractOrderModel order)
      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

      void validatePaymentTimeLimit(List<AbstractOrderEntryModel> orderEntries) throws NDCException
      Validate payment time limit.
      Parameters:
      orderEntries - the order entries
      Throws:
      NDCException - the ndc exception