Class ExternalAPSProvider
java.lang.Object
com.broadleafcommerce.payment.service.gateway.provider.external.AbstractExternalProvider
com.broadleafcommerce.payment.service.gateway.provider.external.ExternalAPSProvider
- All Implemented Interfaces:
APSProvider
This particular implementation of
ExternalAPSProvider
is designed to interact with a
provider that will perform some action.- Author:
- Muhammad Salman Farooq
-
Constructor Summary
ConstructorsConstructorDescriptionExternalAPSProvider
(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, APSSignatureService signatureUtil, ExternalAPSProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected String
protected ExternalAPSProperties
protected APSSignatureService
Convinience method to create a post request with APS Payfort APIprotected void
Methods inherited from class com.broadleafcommerce.payment.service.gateway.provider.external.AbstractExternalProvider
executeRequest, getObjectMapper, getWebClient, uriVars
-
Constructor Details
-
ExternalAPSProvider
public ExternalAPSProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, APSSignatureService signatureUtil, ExternalAPSProperties properties)
-
-
Method Details
-
postRequest
public Map<String,Object> postRequest(Map<String, Object> bodyParams, @Nullable String applicationId, @Nullable String tenantId) throws SignatureCreationException, APSResponseSignatureMismatchException, ProviderApiExceptionDescription copied from interface:APSProvider
Convinience method to create a post request with APS Payfort API- Specified by:
postRequest
in interfaceAPSProvider
applicationId
- the application idtenantId
- the tenant id- Returns:
- Map object containing response from APS Payfort API
- Throws:
SignatureCreationException
- if some error occur while creating or validation the signaturesProviderApiException
- if some error occur while communicating with APS Payfort APIAPSResponseSignatureMismatchException
-
getEndpointUrl
-
createRequestSignature
-
validateResponseSignature
protected void validateResponseSignature(Map<String, Object> responseMap, @Nullable String applicationId, @Nullable String tenantId) throws ResponseSignatureCreationException, APSResponseSignatureMismatchException -
getProperties
-
getSignatureUtil
-