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 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 transaction
      requestId - The id representing this request to checkout
      lockToken - the token that owns the payment lock
      contextInfo - 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 transaction
      requestId - The id representing this request to checkout
      lockToken - the token that owns the payment lock
      contextInfo - 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 the PaymentCallbackValidationResponse for interpretation.
      Parameters:
      validationRequest - the validation request to perform on this payment callback
      contextInfo - 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 transaction
      request - A map of the payment-gateway-provided properties used to lookup the transaction
      contextInfo - context information related to multitenancy.
      Returns:
      a TransactionExecutionResponse object describing the result of the transaction