Class DefaultOrderCreatePaymentTransactionHandler

java.lang.Object
de.hybris.platform.ndc182facades.facades.order.handlers.impl.DefaultOrderCreatePaymentTransactionHandler
All Implemented Interfaces:
OrderCreateHandler

public class DefaultOrderCreatePaymentTransactionHandler extends Object implements OrderCreateHandler
The ndc 18.2 implementation of of OrderCreateHandler interface.
  • Constructor Details

    • DefaultOrderCreatePaymentTransactionHandler

      public DefaultOrderCreatePaymentTransactionHandler()
  • Method Details

    • handle

      public void handle(Map<String,List<NDCOfferData>> ndcOfferDataMap, OrderModel order, IATAOrderCreateRQ orderCreateRQ) throws NDCException
      This handler creates the payment transactions and link the order entries to them. 1) Retrieves all the empty payment transactions and remove them from the order. 2) If the list of paymentInfos is empty, creates an empty transaction and links all the order entries to it. Otherwise, create one payment transaction for each paymentInfo in the list. 3) Validates the payment transactions against the total amount of the order and the amount of the order entries associated to each of them.
      Specified by:
      handle in interface OrderCreateHandler
      Parameters:
      ndcOfferDataMap - the ndcOfferDataMap
      order - the order
      orderCreateRQ - the orderCreateRQ
      Throws:
      NDCException
    • createPaymentTransactionsFromNdcOfferDataMap

      protected void createPaymentTransactionsFromNdcOfferDataMap(Map<String,List<NDCOfferData>> ndcOfferDataMap, OrderModel order, List<PaymentInfoType> paymentInfos) throws NDCException
      Creates a payment transaction list from ndcOfferDataMap. For each payment info, filter the ndcOfferData linked to that payment and create a payment transaction associated to them.
      Parameters:
      ndcOfferDataMap - the map of NDCOfferData class type and list of NdcOfferData of that type. NDCCarrierOfferData - NDCAlaCarteOfferData.
      order - the order
      paymentInfos - the payment infos
      Throws:
      NDCException
    • 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
    • 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
    • getNdcPaymentFacade

      protected NDCPaymentFacade getNdcPaymentFacade()
      Gets ndc payment facade.
      Returns:
      the ndc payment facade
    • setNdcPaymentFacade

      public void setNdcPaymentFacade(NDCPaymentFacade ndcPaymentFacade)
      Sets ndc payment facade.
      Parameters:
      ndcPaymentFacade - the ndc payment facade