Class DefaultCisSapDigitalPaymentService

java.lang.Object
de.hybris.platform.cissapdigitalpayment.service.impl.DefaultCisSapDigitalPaymentService
All Implemented Interfaces:
CisSapDigitalPaymentService

public class DefaultCisSapDigitalPaymentService extends Object implements CisSapDigitalPaymentService
Default implementation of CisSapDigitalPaymentService
  • Constructor Details

    • DefaultCisSapDigitalPaymentService

      public DefaultCisSapDigitalPaymentService()
  • Method Details

    • getRegistrationUrl

      public rx.Observable<CisSapDigitalPaymentRegistrationUrlResult> getRegistrationUrl() throws TimeoutException
      Retrive the card registration URL from SAP Digital payments
      Specified by:
      getRegistrationUrl in interface CisSapDigitalPaymentService
      Returns:
      CisSapDigitalPaymentRegistrationUrlResult - Registration URL response from digital payments wrapped with Observable<>
      Throws:
      TimeoutException - when timeout occurs
    • pollRegisteredCard

      public rx.Observable<CisSapDigitalPaymentPollRegisteredCardResult> pollRegisteredCard(String sessionId, SAPDigitalPaymentConfigurationModel sapDigiPayConfig)
      Polling the card details entered at SAP Digital payments screen. This method is invoked by a process that continuously polls the card with the session ID received during the card registration request. Polling will continue until it receives Cancelled, Timeout or Success status.
      Specified by:
      pollRegisteredCard in interface CisSapDigitalPaymentService
      Parameters:
      sessionId - - Session IDreceived during the card registration
      sapDigiPayConfig - - SAP Digital payment configuration
      Returns:
      CisSapDigitalPaymentPollRegisteredCardResult - Poll card response wrapped in Observable<>
    • authorizePayment

      public rx.Observable<CisSapDigitalPaymentAuthorizationResultList> authorizePayment(CisSapDigitalPaymentAuthorizationRequestList authorizationRequests)
      Make a payment authorization call to SAP Digital payments
      Specified by:
      authorizePayment in interface CisSapDigitalPaymentService
      Parameters:
      authorizationRequests - - List of CisSapDigitalPaymentAuthorizationRequest object
      Returns:
      CisSapDigitalPaymentAuthorizationResultList - Payment authorization response wrapped around Observable<>
    • deleteCard

      public rx.Observable<CisSapDigitalPaymentCardDeletionResultList> deleteCard(CisSapDigitalPaymentCardDeletionRequestList deletCardRequests, SapDigitalPaymentConfigurationStrategy sapDigitalPaymentConfigurationStrategy)
      Delete the payment card information from SAP Digital payments
      Specified by:
      deleteCard in interface CisSapDigitalPaymentService
      Parameters:
      deletCardRequests - - Delete card request list of CisSapDigitalPaymentTokenizedCardResult
      sapDigitalPaymentConfigurationStrategy - - SAP Digital payment configuration strategy
      Returns:
      CisSapDigitalPaymentCardDeletionResultList - delete card result wrapped around Observable<>
    • chargePayment

      public rx.Observable<CisSapDigitalPaymentChargeResultList> chargePayment(CisSapDigitalPaymentChargeRequestList chargeRequests, SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)
      Settlement of the authorized payment with SAP Digital payments.
      Specified by:
      chargePayment in interface CisSapDigitalPaymentService
      Parameters:
      chargeRequests - - List of CisSapDigitalPaymentChargeRequest.
      sapDigitalPaymentConfig - - SAP Digital payment configuration
      Returns:
      CisSapDigitalPaymentChargeResultList - Charge payment result wrapped around Observable<>
    • refundPayment

      public rx.Observable<CisSapDigitalPaymentRefundResultList> refundPayment(CisSapDigitalPaymentRefundRequestList refundRequests, SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)
      Refund the payment with SAP Digital payments.
      Specified by:
      refundPayment in interface CisSapDigitalPaymentService
      Parameters:
      refundRequests - - List of CisSapDigitalPaymentRefundRequest
      sapDigitalPaymentConfig - - SAP Digital payment configuration
      Returns:
      CisSapDigitalPaymentRefundResultList - refund payment result wrapped around Observable<>
    • getCisSapDigitalPaymentClient

      public 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
    • 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>
    • getPollCardStatusMap

      public static Map<String,String> getPollCardStatusMap()
      Returns:
      the pollCardStatusMap
    • setPollCardStatusMap

      public static void setPollCardStatusMap(Map<String,String> pollCardStatusMap)
      Parameters:
      pollCardStatusMap - the pollCardStatusMap to set
    • getDefaultPollCardDelay

      public long getDefaultPollCardDelay()
      Returns:
      the defaultPollCardDelay
    • setDefaultPollCardDelay

      public void setDefaultPollCardDelay(long defaultPollCardDelay)
      Parameters:
      defaultPollCardDelay - the defaultPollCardDelay to set
    • getSapDigitalPaymentConfigurationStrategy

      public SapDigitalPaymentConfigurationStrategy getSapDigitalPaymentConfigurationStrategy()
      Returns:
      the sapDigitalPaymentConfigurationStrategy
    • setSapDigitalPaymentConfigurationStrategy

      public void setSapDigitalPaymentConfigurationStrategy(SapDigitalPaymentConfigurationStrategy sapDigitalPaymentConfigurationStrategy)
      Parameters:
      sapDigitalPaymentConfigurationStrategy - the sapDigitalPaymentConfigurationStrategy to set
    • getLog

      public static org.apache.log4j.Logger getLog()
      Returns:
      the log