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 ofPaymentProvider
is 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.UriComponentsBuilder
getBaseUri()
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 ExternalPaymentProperties
getProperties()
protected String
getServiceClient()
List<P>
readAllByCartId(@NonNull String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieves a list ofPayments
that 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:PaymentProvider
Retrieves a list ofPayments
that belong to the given cart id.- Specified by:
readAllByCartId
in interfacePaymentProvider<P extends Payment>
- Parameters:
cartId
- the cart id of thePayments
to retrievecontextInfo
- context information around sandbox and multitenant state.- Returns:
- a list of
Payments
that 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()
-
-