Class DefaultSapRevenueCloudDigitalPaymentService

java.lang.Object
com.sap.hybris.saprevenueclouddpaddon.service.impl.DefaultSapRevenueCloudDigitalPaymentService
All Implemented Interfaces:
SapRevenueCloudDigitalPaymentService

public class DefaultSapRevenueCloudDigitalPaymentService extends Object implements SapRevenueCloudDigitalPaymentService
Default Implementation for SapRevenueCloudDigitalPaymentService
  • Constructor Details

    • DefaultSapRevenueCloudDigitalPaymentService

      public DefaultSapRevenueCloudDigitalPaymentService()
  • Method Details

    • checkPaymentCardRegistration

      public CreditCardPaymentInfoModel checkPaymentCardRegistration(String sessionId)
      Description copied from interface: SapRevenueCloudDigitalPaymentService
      Checks payment card registration if successful then saves model in commerce
      Specified by:
      checkPaymentCardRegistration in interface SapRevenueCloudDigitalPaymentService
      Parameters:
      sessionId - Session ID of digital payment registration request
      Returns:
      CreditCardPaymentInfoModel if successful else null
    • saveCCPaymentInfo

      protected CreditCardPaymentInfoModel saveCCPaymentInfo(CisSapDigitalPaymentPollRegisteredCardResult cisSapDigitalPaymentPollRegisteredCardResult)
      Saves credit card details locally
      Parameters:
      cisSapDigitalPaymentPollRegisteredCardResult - result from Digital Payments
      Returns:
      If successful then instance of credit card model otherwise null
    • pollRegisteredCard

      protected rx.Observable<CisSapDigitalPaymentPollRegisteredCardResult> pollRegisteredCard(String sessionId, SAPDigitalPaymentConfigurationModel sapDigiPayConfig)
      Polling the card details entered at SAP Digital payments screen.
      Parameters:
      sessionId - - Session ID received during the card registration
      sapDigiPayConfig - - SAP Digital payment configuration
      Returns:
      CisSapDigitalPaymentPollRegisteredCardResult - Poll card response wrapped in Observable<>
    • createDigitalPaymentConfigurationMap

      protected Map<String,String> createDigitalPaymentConfigurationMap(SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)
      Creates the Map<String,String> with all the properties required to create a SapDigitalPaymentClient.
      Parameters:
      sapDigitalPaymentConfig - - SAP Digital payment configuration model
      Returns:
      Map<String, String>
    • getCisSapDigitalPaymentClient

      protected SapDigitalPaymentClient getCisSapDigitalPaymentClient(SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)
      Create the Sap Digital payment charon client from the SAP digital payment configuration
      Parameters:
      sapDigitalPaymentConfig - - sap digital payment configuration
      Returns:
      SapDigitalPaymentClient - SAP Digital payment client
    • getCisSapDigitalPaymentPaymentInfoConverter

      public de.hybris.platform.servicelayer.dto.converter.Converter<CisSapDigitalPaymentPollRegisteredCardResult,CCPaymentInfoData> getCisSapDigitalPaymentPaymentInfoConverter()
      Returns:
      the cisSapDigitalPaymentPaymentInfoConverter
    • setCisSapDigitalPaymentPaymentInfoConverter

      public void setCisSapDigitalPaymentPaymentInfoConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CisSapDigitalPaymentPollRegisteredCardResult,CCPaymentInfoData> cisSapDigitalPaymentPaymentInfoConverter)
      Parameters:
      cisSapDigitalPaymentPaymentInfoConverter - the cisSapDigitalPaymentPaymentInfoConverter to set
    • getSapDigitalPaymentService

      public SapDigitalPaymentService getSapDigitalPaymentService()
      Returns:
      the sapDigitalPaymentService
    • setSapDigitalPaymentService

      public void setSapDigitalPaymentService(SapDigitalPaymentService sapDigitalPaymentService)
      Parameters:
      sapDigitalPaymentService - the sapDigitalPaymentService to set
    • getModelService

      public de.hybris.platform.servicelayer.model.ModelService getModelService()
      Returns:
      the modelService
    • getCcPaymentInfoReverseConverter

      public de.hybris.platform.servicelayer.dto.converter.Converter<CCPaymentInfoData,CreditCardPaymentInfoModel> getCcPaymentInfoReverseConverter()
      Returns:
      ccPaymentInfoReverseConverter
    • setModelService

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

      public void setCcPaymentInfoReverseConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CCPaymentInfoData,CreditCardPaymentInfoModel> ccPaymentInfoReverseConverter)
      Parameters:
      ccPaymentInfoReverseConverter - payment info converter
    • getBaseStoreService

      public de.hybris.platform.store.services.BaseStoreService getBaseStoreService()
      Returns:
      baseStoreService
    • setBaseStoreService

      public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)
      Parameters:
      baseStoreService - base store service
    • getSapDigiPayPollCardStatusMap

      public Map<String,String> getSapDigiPayPollCardStatusMap()
      Returns:
      sapDigiPayPollCardStatusMap
    • setSapDigiPayPollCardStatusMap

      public void setSapDigiPayPollCardStatusMap(Map<String,String> sapDigiPayPollCardStatusMap)
      Parameters:
      sapDigiPayPollCardStatusMap - Digital payments poll card status mapping
    • getUserService

      public de.hybris.platform.servicelayer.user.UserService getUserService()
      Returns:
      userService
    • setUserService

      public void setUserService(de.hybris.platform.servicelayer.user.UserService userService)
      Parameters:
      userService - user service
    • getCartService

      public de.hybris.platform.order.CartService getCartService()
      Returns:
      cartService
    • setCartService

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

      public de.hybris.platform.servicelayer.dto.converter.Converter<AddressModel,AddressData> getAddressConverter()
      Returns:
      addressConverter
    • setAddressConverter

      public void setAddressConverter(de.hybris.platform.servicelayer.dto.converter.Converter<AddressModel,AddressData> addressConverter)
      Parameters:
      addressConverter - addressConverter
    • getSapDigitalPaymentPollResultConverter

      public de.hybris.platform.servicelayer.dto.converter.Converter<CisSapDigitalPaymentPollRegisteredCardResult,SapRcDigitalPaymentPollResultData> getSapDigitalPaymentPollResultConverter()
      Returns:
      sapDigitalPaymentPollResultConverter
    • setSapDigitalPaymentPollResultConverter

      public void setSapDigitalPaymentPollResultConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CisSapDigitalPaymentPollRegisteredCardResult,SapRcDigitalPaymentPollResultData> sapDigitalPaymentPollResultConverter)
      Parameters:
      sapDigitalPaymentPollResultConverter - digital payment poll result converter