Class ExternalPaymentTransactionExecutionProvider
java.lang.Object
com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
com.broadleafcommerce.cartoperation.service.provider.external.payments.ExternalPaymentTransactionExecutionProvider
- All Implemented Interfaces:
PaymentTransactionExecutionProvider
public class ExternalPaymentTransactionExecutionProvider
extends AbstractExternalProvider
implements PaymentTransactionExecutionProvider
- Author:
- Chris Kittrell (ckittrell)
-
Field Summary
FieldsFields inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
ENTITY_NOT_FOUND
-
Constructor Summary
ConstructorsConstructorDescriptionExternalPaymentTransactionExecutionProvider
(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalPaymentProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionauthorizeAndCapturePayment
(@NonNull String paymentId, @NonNull Integer paymentVersion, @NonNull TransactionExecutionRequest request, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) authorizePayment
(@NonNull String paymentId, @NonNull Integer paymentVersion, @NonNull TransactionExecutionRequest request, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected org.springframework.web.util.UriComponentsBuilder
Gets the base URI common to all requests this provider will make.protected String
lookup3DSTransactionResult
(@NonNull String paymentId, @NonNull String requestId, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the 3DS transaction results from the gateway.Methods inherited from class com.broadleafcommerce.cartoperation.service.provider.external.AbstractExternalProvider
buildNotFoundException, executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, isEntityNotFound, pageableToParams, uriVars
-
Field Details
-
DEFAULT_HEADER_PAYMENT_VERSION
- See Also:
-
DEFAULT_HEADER_PAYMENT_LOCK_TOKEN
- See Also:
-
-
Constructor Details
-
ExternalPaymentTransactionExecutionProvider
public ExternalPaymentTransactionExecutionProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalPaymentProperties properties)
-
-
Method Details
-
authorizePayment
public TransactionExecutionResponse authorizePayment(@NonNull @NonNull String paymentId, @NonNull @NonNull Integer paymentVersion, @NonNull @NonNull TransactionExecutionRequest request, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
authorizePayment
in interfacePaymentTransactionExecutionProvider
-
authorizeAndCapturePayment
public TransactionExecutionResponse authorizeAndCapturePayment(@NonNull @NonNull String paymentId, @NonNull @NonNull Integer paymentVersion, @NonNull @NonNull TransactionExecutionRequest request, String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
authorizeAndCapturePayment
in interfacePaymentTransactionExecutionProvider
-
lookup3DSTransactionResult
public TransactionExecutionResponse lookup3DSTransactionResult(@NonNull @NonNull String paymentId, @NonNull @NonNull String requestId, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:PaymentTransactionExecutionProvider
Looks up the 3DS transaction results from the gateway. If the results are present in the payment gateway, but not in Payment Transaction Services, then record the results; otherwise, return the existing transaction results.- Specified by:
lookup3DSTransactionResult
in interfacePaymentTransactionExecutionProvider
- Parameters:
paymentId
- the id of the payment that contains a reference to the required 3DS transactionrequestId
- The id representing this request to checkoutlockToken
- the token that owns the payment lockcontextInfo
- context information around sandbox and multitenant state
-
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
-
getServiceClient
-