Package com.skava.paymentapp.util
Class AppCommonUtil
java.lang.Object
com.skava.paymentapp.util.AppCommonUtilEx
com.skava.paymentapp.util.AppCommonUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAppBasedCancelAuthRequest
(String authorizationCode, BigDecimal amount, Map<String, Object> otherProperties, com.skava.payment.service.impl.CommonDependencies commonDependencies) getAuthRequest
(BigDecimal amount, Map<String, Object> otherProperties) getChargeRequest
(String authorizationCode, BigDecimal amount, Map<String, Object> otherProperties, com.skava.payment.repository.collection.CollectionRepository collectionRepository, com.skava.payment.service.impl.CommonDependencies commonDependencies) com.skava.payment.model.response.PaymentProcessorResponse
getCommonPaymentResponse
(String invokeAppResponse) getCreditRequest
(BigDecimal amount, Map<String, Object> otherProperties) getDirectChargeRequest
(BigDecimal amount, Map<String, Object> otherProperties) getPaymentProfileRequest
(com.skava.payment.model.payment.PaymentInfo paymentInfo, String currency, Map<String, Object> otherProperties) getRefundRequest
(String authorizationCode, BigDecimal amount, Map<String, Object> otherProperties, com.skava.payment.service.impl.CommonDependencies commonDependencies) getSessionRequest
(BigDecimal amount, String currency) void
setTokenResponse
(com.skava.payment.model.entity.payment.PaymentEntity paymentEntity, com.skava.payment.model.response.PaymentProcessorResponse paymentProcessorResponse, Map<String, Object> otherProperties, com.skava.payment.util.PaymentUtil paymentUtil) Methods inherited from class com.skava.paymentapp.util.AppCommonUtilEx
billingAddressEntityToAppBillingAddress, getMapForProperties, getPaymentEntity, getPaymentItemPropsValue, getPaymentPropertiesMap, getPaymentPropsMap, getPropertyValue, getqueryparam, getTransactionPropsMap, listToHashmap, setGlobalValues, setGlobalValues, shippingAddressEntityToAppShippingAddress
-
Constructor Details
-
AppCommonUtil
public AppCommonUtil()
-
-
Method Details
-
getPaymentProfileRequest
public AppCommonPaymentRequest getPaymentProfileRequest(com.skava.payment.model.payment.PaymentInfo paymentInfo, String currency, Map<String, Object> otherProperties) - Parameters:
appConfigurationData
-paymentInfo
-currency
-- Returns:
- TokenRequest
-
getAuthRequest
public AppCommonPaymentRequest getAuthRequest(BigDecimal amount, Map<String, Object> otherProperties) - Parameters:
appConfigurationData
-amount
-otherProperties
-- Returns:
- AppCommonPaymentRequest
-
setTokenResponse
public void setTokenResponse(com.skava.payment.model.entity.payment.PaymentEntity paymentEntity, com.skava.payment.model.response.PaymentProcessorResponse paymentProcessorResponse, Map<String, Object> otherProperties, com.skava.payment.util.PaymentUtil paymentUtil) - Parameters:
paymentEntity
-paymentProcessorResponse
-otherProperties
-
-
getRefundRequest
public AppCommonPaymentRequest getRefundRequest(String authorizationCode, BigDecimal amount, Map<String, Object> otherProperties, com.skava.payment.service.impl.CommonDependencies commonDependencies) -
getCreditRequest
public AppCommonPaymentRequest getCreditRequest(BigDecimal amount, Map<String, Object> otherProperties) - Parameters:
appConfigurationData
-amount
-otherProperties
-- Returns:
- DepositeRequest
-
getDirectChargeRequest
public AppCommonPaymentRequest getDirectChargeRequest(BigDecimal amount, Map<String, Object> otherProperties) - Parameters:
appConfigurationData
-amount
-otherProperties
-- Returns:
- DirectCaptureRequest
-
getSessionRequest
- Parameters:
appConfigurationData
-- Returns:
- SessionRequest
-
updateAppProperties
public Map<String,String> updateAppProperties(Map<String, Object> otherProperties, Map<String, String> paymentProperties) - Parameters:
otherProperties
-- Returns:
- Hashmap of AppProperties
-
getAppBasedCancelAuthRequest
public AppCommonPaymentRequest getAppBasedCancelAuthRequest(String authorizationCode, BigDecimal amount, Map<String, Object> otherProperties, com.skava.payment.service.impl.CommonDependencies commonDependencies) - Parameters:
authorizationCode
- holds valid authorization codeamount
- holds valid amountotherProperties
- holds valid other properties- Returns:
- CancelAuthRequest object
-
getChargeRequest
public AppCommonPaymentRequest getChargeRequest(String authorizationCode, BigDecimal amount, Map<String, Object> otherProperties, com.skava.payment.repository.collection.CollectionRepository collectionRepository, com.skava.payment.service.impl.CommonDependencies commonDependencies) - Parameters:
authorizationCode
- holds valid auth codeamount
- holds amountotherProperties
- holds other propertiescollectionRepository
- holds collection repositorycommonDependencies
- holds common dependencies object- Returns:
- AppCommonPaymentRequest object
-
getCommonPaymentResponse
public com.skava.payment.model.response.PaymentProcessorResponse getCommonPaymentResponse(String invokeAppResponse) - Parameters:
invokeAppResponse
- holds the valid response object- Returns:
- PaymentProcessorResponse Object
-