Class DefaultCisSapDigitalPaymentService
- java.lang.Object
-
- de.hybris.platform.cissapdigitalpayment.service.impl.DefaultCisSapDigitalPaymentService
-
- All Implemented Interfaces:
CisClientService,CisSapDigitalPaymentService
public class DefaultCisSapDigitalPaymentService extends java.lang.Object implements CisSapDigitalPaymentService
Default implementation ofCisSapDigitalPaymentService
-
-
Constructor Summary
Constructors Constructor Description DefaultCisSapDigitalPaymentService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description rx.Observable<CisSapDigitalPaymentAuthorizationResultList>authorizePayment(CisSapDigitalPaymentAuthorizationRequestList authorizationRequests)Make a payment authorization call to SAP Digital paymentsrx.Observable<CisSapDigitalPaymentChargeResultList>chargePayment(CisSapDigitalPaymentChargeRequestList chargeRequests, SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)Settlement of the authorized payment with SAP Digital payments.protected java.util.Map<java.lang.String,java.lang.String>createDigitalPaymentConfigurationMap(SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)Creates the Mapwith all the properties required to create a SapDigitalPaymentClient. rx.Observable<CisSapDigitalPaymentCardDeletionResultList>deleteCard(CisSapDigitalPaymentCardDeletionRequestList deletCardRequests, SapDigitalPaymentConfigurationStrategy sapDigitalPaymentConfigurationStrategy)Delete the payment card information from SAP Digital paymentsSapDigitalPaymentClientgetCisSapDigitalPaymentClient(SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)Create the Sap Digital payment charon client from the SAP digital payment configurationlonggetDefaultPollCardDelay()static org.apache.log4j.LoggergetLog()static java.util.Map<java.lang.String,java.lang.String>getPollCardStatusMap()rx.Observable<CisSapDigitalPaymentRegistrationUrlResult>getRegistrationUrl()Retrive the card registration URL from SAP Digital paymentsSapDigitalPaymentConfigurationStrategygetSapDigitalPaymentConfigurationStrategy()booleanping(java.lang.String xCisClientRef, java.lang.String tenantId)Default implementation for CisClientService interface methodrx.Observable<CisSapDigitalPaymentPollRegisteredCardResult>pollRegisteredCard(java.lang.String sessionId, SAPDigitalPaymentConfigurationModel sapDigiPayConfig)Polling the card details entered at SAP Digital payments screen.rx.Observable<CisSapDigitalPaymentRefundResultList>refundPayment(CisSapDigitalPaymentRefundRequestList refundRequests, SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)Refund the payment with SAP Digital payments.voidsetDefaultPollCardDelay(long defaultPollCardDelay)static voidsetPollCardStatusMap(java.util.Map<java.lang.String,java.lang.String> pollCardStatusMap)voidsetSapDigitalPaymentConfigurationStrategy(SapDigitalPaymentConfigurationStrategy sapDigitalPaymentConfigurationStrategy)
-
-
-
Method Detail
-
ping
public boolean ping(java.lang.String xCisClientRef, java.lang.String tenantId)Default implementation for CisClientService interface method- Specified by:
pingin interfaceCisClientService- Parameters:
xCisClientRef- - xCisClientReftenantId- - tenant ID- Returns:
- boolean
-
getRegistrationUrl
public rx.Observable<CisSapDigitalPaymentRegistrationUrlResult> getRegistrationUrl() throws java.util.concurrent.TimeoutException
Retrive the card registration URL from SAP Digital payments- Specified by:
getRegistrationUrlin interfaceCisSapDigitalPaymentService- Returns:
- CisSapDigitalPaymentRegistrationUrlResult - Registration URL response from digital payments wrapped with Observable<>
- Throws:
java.util.concurrent.TimeoutException
-
pollRegisteredCard
public rx.Observable<CisSapDigitalPaymentPollRegisteredCardResult> pollRegisteredCard(java.lang.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:
pollRegisteredCardin interfaceCisSapDigitalPaymentService- Parameters:
sessionId- - Session IDreceived during the card registrationsapDigiPayConfig- - 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:
authorizePaymentin interfaceCisSapDigitalPaymentService- 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:
deleteCardin interfaceCisSapDigitalPaymentService- Parameters:
deletCardRequests- - Delete card request list of CisSapDigitalPaymentTokenizedCardResultsapDigitalPaymentConfigurationStrategy- - 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:
chargePaymentin interfaceCisSapDigitalPaymentService- 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:
refundPaymentin interfaceCisSapDigitalPaymentService- Parameters:
refundRequests- - refund request listsapDigitalPaymentConfig- - 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 java.util.Map<java.lang.String,java.lang.String> createDigitalPaymentConfigurationMap(SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig)
Creates the Mapwith all the properties required to create a SapDigitalPaymentClient. - Parameters:
sapDigitalPaymentConfig- - SAP Digital payment configuration model- Returns:
- Map
-
getPollCardStatusMap
public static java.util.Map<java.lang.String,java.lang.String> getPollCardStatusMap()
- Returns:
- the pollCardStatusMap
-
setPollCardStatusMap
public static void setPollCardStatusMap(java.util.Map<java.lang.String,java.lang.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
-
-