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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrx.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.createDigitalPaymentConfigurationMap(SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig) Creates the Map<String,String> with all the properties required to create a SapDigitalPaymentClient.rx.Observable<CisSapDigitalPaymentCardDeletionResultList>deleteCard(CisSapDigitalPaymentCardDeletionRequestList deletCardRequests, SapDigitalPaymentConfigurationStrategy sapDigitalPaymentConfigurationStrategy) Delete the payment card information from SAP Digital paymentsgetCisSapDigitalPaymentClient(SAPDigitalPaymentConfigurationModel sapDigitalPaymentConfig) Create the Sap Digital payment charon client from the SAP digital payment configurationlongstatic org.apache.log4j.LoggergetLog()rx.Observable<CisSapDigitalPaymentRegistrationUrlResult>Retrive the card registration URL from SAP Digital paymentsrx.Observable<CisSapDigitalPaymentPollRegisteredCardResult>pollRegisteredCard(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(Map<String, String> pollCardStatusMap) voidsetSapDigitalPaymentConfigurationStrategy(SapDigitalPaymentConfigurationStrategy sapDigitalPaymentConfigurationStrategy)
-
Constructor Details
-
DefaultCisSapDigitalPaymentService
public DefaultCisSapDigitalPaymentService()
-
-
Method Details
-
getRegistrationUrl
public rx.Observable<CisSapDigitalPaymentRegistrationUrlResult> getRegistrationUrl() throws TimeoutExceptionRetrive the card registration URL from SAP Digital payments- Specified by:
getRegistrationUrlin interfaceCisSapDigitalPaymentService- 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:
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- - List of CisSapDigitalPaymentRefundRequestsapDigitalPaymentConfig- - 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
- Returns:
- the pollCardStatusMap
-
setPollCardStatusMap
- 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
- 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
-