Interface ThreeDSTransactionResultService

All Known Implementing Classes:
DefaultThreeDSTransactionResultService

public interface ThreeDSTransactionResultService
The service to check the payment transaction result.
Author:
Dima Myroniuk (dmyroniuk)
  • Method Details

    • identifyTransactionRequiring3DSVerification

      PaymentTransaction identifyTransactionRequiring3DSVerification(@NonNull @NonNull Payment payment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds the transaction that required 3DS results.
      Parameters:
      payment - the payment object that contains a reference to the required transaction
      context - context information related to multitenancy
      Returns:
      the transaction that required 3DS results
      Throws:
      TransactionIdentificationException - if a transaction requiring 3DS verification cannot be found
    • lookupAndRecord3DSTransactionResult

      TransactionExecutionResponse lookupAndRecord3DSTransactionResult(Payment payment, @NonNull @NonNull PaymentTransaction transactionRequiring3DS, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads the transaction result using PaymentGateway3DSTransactionLookupService, records the result to the appropriate transaction and payment.

      This can be used, for example, to verify that a customer has approved a payment for transactions that require 3D security checks.

      Parameters:
      payment - the payment gateway type that is used to identify the appropriate PaymentGateway3DSTransactionLookupService
      transactionRequiring3DS - the transaction that requires 3DS results
      lockToken - Token granted to resource that owns the payment lock.
      context - context information related to multitenancy
      Returns:
      the TransactionExecutionResponse describing the resulting transaction and PaymentSummary
      Throws:
      UnsupportedOperationException - when looking up transaction results is not supported for the related payment gateway
      com.broadleafcommerce.paymentgateway.service.exception.InvalidGatewayConfigurationException - when the integration is not sufficiently configured to look up transaction results
      com.broadleafcommerce.paymentgateway.service.exception.InvalidFetchPaymentDetailsParamsException - when insufficient data is provided to look up transaction results
      com.broadleafcommerce.paymentgateway.service.exception.FetchTransactionResultsException - when an error occurred while looking up transaction results
      com.broadleafcommerce.paymentgateway.service.exception.TransactionNotFoundException - when a transaction cannot be found, based on the provided data
      com.broadleafcommerce.paymentgateway.service.exception.TransactionResultsNotAvailableException - when the 3DS transaction results are not yet available
      com.broadleafcommerce.common.messaging.exception.ResourceLockException - when a payment lock cannot be obtained to record 3DS transaction results
    • handleTransactionResult

      TransactionExecutionResponse handleTransactionResult(String gatewayType, Map<String,String> requestParams, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads the transaction result using PaymentGateway3DSTransactionLookupService, records the result to the appropriate transaction and payment.

      This can be used, for example, to verify that a customer has approved a payment for transactions that require 3D security checks.

      Parameters:
      gatewayType - the payment gateway type that is used to identify the appropriate PaymentGateway3DSTransactionLookupService
      requestParams - the parameters for request
      context - context information related to multitenancy
      Returns:
      the TransactionExecutionDetail describing the resulting transaction and PaymentSummary
      Throws:
      UnsupportedOperationException - when looking up transaction results is not supported for the related payment gateway
      com.broadleafcommerce.paymentgateway.service.exception.InvalidGatewayConfigurationException - when the integration is not sufficiently configured to look up transaction results
      com.broadleafcommerce.paymentgateway.service.exception.InvalidFetchPaymentDetailsParamsException - when insufficient data is provided to look up transaction results
      com.broadleafcommerce.paymentgateway.service.exception.FetchTransactionResultsException - when an error occurred while looking up transaction results
      com.broadleafcommerce.paymentgateway.service.exception.TransactionNotFoundException - when a transaction cannot be found, based on the provided data
      com.broadleafcommerce.paymentgateway.service.exception.TransactionResultsNotAvailableException - when the 3DS transaction results are not yet available
      com.broadleafcommerce.common.messaging.exception.ResourceLockException - when a payment lock cannot be obtained to record 3DS transaction results