Class ExternalPaymentProvider<P extends Payment>
- java.lang.Object
-
- com.broadleafcommerce.customer.service.provider.external.AbstractExternalProvider
-
- com.broadleafcommerce.customer.service.provider.external.ExternalPaymentProvider<P>
-
- All Implemented Interfaces:
PaymentProvider<P>
public class ExternalPaymentProvider<P extends Payment> extends AbstractExternalProvider implements PaymentProvider<P>
This particular implementation ofPaymentProvideris designed to interact with the payment transaction service.- Author:
- Chris Kittrell (ckittrell)
-
-
Constructor Summary
Constructors Constructor Description ExternalPaymentProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalPaymentProperties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.web.util.UriComponentsBuildergetBaseUri()Gets the base URI common to all requests this provider will make.protected org.springframework.core.ParameterizedTypeReference<ResponsePageGenerator<P>>getPageType()Gets the type reference for a page generator of item list items.protected ExternalPaymentPropertiesgetProperties()protected StringgetServiceClient()List<P>readAllByCartId(@NonNull String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieves a list ofPaymentsthat belong to the given cart id.-
Methods inherited from class com.broadleafcommerce.customer.service.provider.external.AbstractExternalProvider
executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, pageableToParams, uriVars
-
-
-
-
Constructor Detail
-
ExternalPaymentProvider
public ExternalPaymentProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalPaymentProperties properties)
-
-
Method Detail
-
readAllByCartId
public List<P> readAllByCartId(@NonNull @NonNull String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:PaymentProviderRetrieves a list ofPaymentsthat belong to the given cart id.- Specified by:
readAllByCartIdin interfacePaymentProvider<P extends Payment>- Parameters:
cartId- the cart id of thePaymentsto retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
- a list of
Paymentsthat belong to the given cart id.
-
getBaseUri
protected org.springframework.web.util.UriComponentsBuilder getBaseUri()
Gets the base URI common to all requests this provider will make.- Returns:
- a URI components builder with the base URI set up
-
getPageType
protected org.springframework.core.ParameterizedTypeReference<ResponsePageGenerator<P>> getPageType()
Gets the type reference for a page generator of item list items.- Returns:
- type reference for a page generator of item list items
-
getServiceClient
protected String getServiceClient()
-
getProperties
protected ExternalPaymentProperties getProperties()
-
-