Class AbstractExternalProvider
- java.lang.Object
-
- com.broadleafcommerce.payment.service.gateway.privider.external.AbstractExternalProvider
-
- Direct Known Subclasses:
ExternalVerifoneProvider
public abstract class AbstractExternalProvider extends Object
An abstract class that is used to execute the requests to the Verifone API.- Author:
- Dima Myroniuk (dmyroniuk)
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringX_VFI_API_IDEMPOTENCYKEY
-
Constructor Summary
Constructors Constructor Description AbstractExternalProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> TexecuteRequest(Supplier<T> request)Executes a request with default Web Client error handling.protected com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()protected org.springframework.web.reactive.function.client.WebClientgetWebClient()protected Map<String,Object>uriVars(Object... keysAndValues)Convenience method to generate a map of variables.
-
-
-
Field Detail
-
X_VFI_API_IDEMPOTENCYKEY
protected static final String X_VFI_API_IDEMPOTENCYKEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
executeRequest
protected <T> T executeRequest(Supplier<T> request)
Executes a request with default Web Client error handling.- Type Parameters:
T- the return type of the request operation- Parameters:
request- the request to execute- Returns:
- the value generated by the supplier
-
uriVars
protected Map<String,Object> uriVars(Object... keysAndValues)
Convenience method to generate a map of variables.- Parameters:
keysAndValues- the keys and values (in pairs, alternating) to transform into a map- Returns:
- the keys and values as a map
-
getWebClient
protected org.springframework.web.reactive.function.client.WebClient getWebClient()
-
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
-