Class DefaultNDCPaymentFacade

java.lang.Object
de.hybris.platform.ndc182shoppingfacades.facades.order.impl.DefaultNDCPaymentFacade
All Implemented Interfaces:
NDCPaymentFacade

public class DefaultNDCPaymentFacade extends Object implements NDCPaymentFacade
The ndc 18.2 implementation of NDCPaymentFacade interface.
  • Constructor Details

    • DefaultNDCPaymentFacade

      public DefaultNDCPaymentFacade()
  • Method Details

    • createPaymentTransactionsFromPaymentInfoNdcOfferDataAssociations

      public void createPaymentTransactionsFromPaymentInfoNdcOfferDataAssociations(AbstractOrderModel order, List<NDCOfferData> ndcOfferDataList, List<String> offerIdsAssociation, BigDecimal paymentInfoAmount) throws NDCException
      Creates payment transactions. 1) If the paymentInfo doesn't contain an offerId, it will create a paymentTransaction associated to the total of the order and to all the order entries. 2) Collects all the order entries related to the associated offers of the paymentinfo, validates the total amount against their total price and if it is valid, creates a payment transaction linked to them. Note: If the order has not been payed, the transaction will be linked to all the order entries.
      Specified by:
      createPaymentTransactionsFromPaymentInfoNdcOfferDataAssociations in interface NDCPaymentFacade
      Parameters:
      order - the order
      ndcOfferDataList - the ndc offer data list
      offerIdsAssociation - the offer ids association
      paymentInfoAmount - the payment info amount
      Throws:
      NDCException - the ndc exception
    • validateTotalOrderAmountAgainstPaymentInfo

      public void validateTotalOrderAmountAgainstPaymentInfo(AbstractOrderModel order, BigDecimal totalPaymentInfoAmount) throws NDCException
      Description copied from interface: NDCPaymentFacade
      Validates the total amount of the order against the paymentInfos. Checks if there are orderEntries that are not linked to any paymentTransactions.
      Specified by:
      validateTotalOrderAmountAgainstPaymentInfo in interface NDCPaymentFacade
      Parameters:
      order - the order
      totalPaymentInfoAmount - the totalPaymentInfoAmount
      Throws:
      NDCException - the ndc exception
    • populatePaymentInfo

      public void populatePaymentInfo(AbstractOrderModel order, NDCPaymentCardInfoData ndcPaymentCardInfoData) throws NDCException
      Creates the creditCardPaymentInfo based on the information contained in the paymentInfos and set the paymentInfo in the order.
      Specified by:
      populatePaymentInfo in interface NDCPaymentFacade
      Parameters:
      order - the order
      ndcPaymentCardInfoData - the ndcPaymentCardInfoData
      Throws:
      NDCException - the ndc exception
    • getMaskedCardNumber

      protected String getMaskedCardNumber(String cardNumber)
      Gets masked card number.
      Parameters:
      cardNumber - the card number
      Returns:
      masked card number
    • createPaymentTransaction

      public void createPaymentTransaction(AbstractOrderModel order, List<AbstractOrderEntryModel> orderEntries, BigDecimal paymentInfoAmount, boolean isPayLater) throws NDCException
      Description copied from interface: NDCPaymentFacade
      Create payment transactions from ndc offer data list.
      Specified by:
      createPaymentTransaction in interface NDCPaymentFacade
      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
    • getCartService

      protected de.hybris.platform.order.CartService getCartService()
      Gets cart service.
      Returns:
      the cart service
    • setCartService

      public void setCartService(de.hybris.platform.order.CartService cartService)
      Sets cart service.
      Parameters:
      cartService - the cart service
    • getModelService

      protected de.hybris.platform.servicelayer.model.ModelService getModelService()
      Gets model service.
      Returns:
      the model service
    • setModelService

      public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService)
      Sets model service.
      Parameters:
      modelService - the model service
    • getCommerceCardTypeService

      protected de.hybris.platform.commerceservices.order.CommerceCardTypeService getCommerceCardTypeService()
      Gets commerce card type service.
      Returns:
      the commerce card type service
    • setCommerceCardTypeService

      public void setCommerceCardTypeService(de.hybris.platform.commerceservices.order.CommerceCardTypeService commerceCardTypeService)
      Sets commerce card type service.
      Parameters:
      commerceCardTypeService - the commerce card type service
    • getNdcPaymentService

      protected NDCPaymentService getNdcPaymentService()
      Gets model service.
      Returns:
      the payment service
    • setNdcPaymentService

      public void setNdcPaymentService(NDCPaymentService ndcPaymentService)
      Sets payment service.
      Parameters:
      ndcPaymentService - the payment service
    • getNdcOrderService

      protected NDCOrderService getNdcOrderService()
      Gets ndc order service.
      Returns:
      the ndc order service
    • setNdcOrderService

      public void setNdcOrderService(NDCOrderService ndcOrderService)
      Sets ndc order service.
      Parameters:
      ndcOrderService - the ndc order service
    • getRetrieveOrderEntryStrategyMap

      protected Map<String,RetrieveOrderEntryStrategy> getRetrieveOrderEntryStrategyMap()
      Gets retrieve order entry strategy map.
      Returns:
      the retrieve order entry strategy map
    • setRetrieveOrderEntryStrategyMap

      public void setRetrieveOrderEntryStrategyMap(Map<String,RetrieveOrderEntryStrategy> retrieveOrderEntryStrategyMap)
      Sets retrieve order entry strategy map.
      Parameters:
      retrieveOrderEntryStrategyMap - the retrieve order entry strategy map