Interface PaymentTransactionExecutionProvider
- All Known Implementing Classes:
ExternalPaymentTransactionExecutionProvider
public interface PaymentTransactionExecutionProvider
Provider for interfacing with a PaymentTransactionService's APIs to execute payment transactions.
- Author:
- Chris Kittrell (ckittrell)
-
Method Summary
Modifier and TypeMethodDescriptionauthorizeAndCapturePayment
(String paymentId, Integer paymentVersion, TransactionExecutionRequest request, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) authorizePayment
(String paymentId, Integer paymentVersion, TransactionExecutionRequest request, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) handleExternalTransactionResult
(String gatewayType, Map<String, Object> request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up external payment transaction results & records them to the relevant transaction.lookup3DSTransactionResult
(String paymentId, String requestId, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the 3DS transaction results from the gateway.lookupExternalTransactionResult
(String paymentId, String requestId, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the external transaction results from the gateway.validatePaymentCallbackToken
(PaymentCallbackValidationRequest validationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Validates the payment callback and returns the validation results in thePaymentCallbackValidationResponse
for interpretation.
-
Method Details
-
authorizePayment
TransactionExecutionResponse authorizePayment(String paymentId, Integer paymentVersion, TransactionExecutionRequest request, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
authorizeAndCapturePayment
TransactionExecutionResponse authorizeAndCapturePayment(String paymentId, Integer paymentVersion, TransactionExecutionRequest request, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
lookup3DSTransactionResult
TransactionExecutionResponse lookup3DSTransactionResult(String paymentId, String requestId, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) 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.- 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- Returns:
- a
TransactionExecutionResponse
object describing the result of the transaction
-
lookupExternalTransactionResult
TransactionExecutionResponse lookupExternalTransactionResult(String paymentId, String requestId, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up the external 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.- Parameters:
paymentId
- the id of the payment that contains a reference to the required external transactionrequestId
- The id representing this request to checkoutlockToken
- the token that owns the payment lockcontextInfo
- context information around sandbox and multitenant state- Returns:
- a
TransactionExecutionResponse
object describing the result of the transaction
-
validatePaymentCallbackToken
PaymentCallbackValidationResponse validatePaymentCallbackToken(PaymentCallbackValidationRequest validationRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Validates the payment callback and returns the validation results in thePaymentCallbackValidationResponse
for interpretation.- Parameters:
validationRequest
- thevalidation request
to perform on this payment callbackcontextInfo
- context information related to multitenancy- Returns:
- the result of the validation
-
handleExternalTransactionResult
TransactionExecutionResponse handleExternalTransactionResult(String gatewayType, Map<String, Object> request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks up external payment transaction results & records them to the relevant transaction.- Parameters:
gatewayType
- The gateway used to process the transactionrequest
- A map of the payment-gateway-provided properties used to lookup the transactioncontextInfo
- context information related to multitenancy.- Returns:
- a
TransactionExecutionResponse
object describing the result of the transaction
-