Class DefaultThreeDSTransactionResultService

java.lang.Object
com.broadleafcommerce.paymenttransaction.service.DefaultThreeDSTransactionResultService
All Implemented Interfaces:
ThreeDSTransactionResultService

public class DefaultThreeDSTransactionResultService extends Object implements ThreeDSTransactionResultService
The default implementation for ThreeDSTransactionResultService.
Author:
Dima Myroniuk (dmyroniuk)
  • Constructor Details

  • Method Details

    • lookupAndRecord3DSTransactionResult

      public TransactionExecutionResponse lookupAndRecord3DSTransactionResult(@NonNull @NonNull Payment payment, @NonNull @NonNull PaymentTransaction transactionRequiring3DS, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: ThreeDSTransactionResultService
      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.

      Specified by:
      lookupAndRecord3DSTransactionResult in interface ThreeDSTransactionResultService
      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
    • handleTransactionResult

      public TransactionExecutionResponse handleTransactionResult(@NonNull @NonNull String gatewayType, @NonNull @NonNull Map<String,String> requestParams, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: ThreeDSTransactionResultService
      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.

      Specified by:
      handleTransactionResult in interface ThreeDSTransactionResultService
      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
    • identifyTransactionRequiring3DSVerification

      public PaymentTransaction identifyTransactionRequiring3DSVerification(@NonNull @NonNull Payment payment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: ThreeDSTransactionResultService
      Finds the transaction that required 3DS results.
      Specified by:
      identifyTransactionRequiring3DSVerification in interface ThreeDSTransactionResultService
      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
    • record3DSTransactionResults

      protected TransactionExecutionResponse record3DSTransactionResults(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull Payment payment, @NonNull @NonNull PaymentTransaction transactionRequiring3DS, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • buildThreeDSTransactionNotFoundResponse

      protected TransactionExecutionResponse buildThreeDSTransactionNotFoundResponse(@NonNull @NonNull PaymentTransaction transactionRequiring3DS, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • identify3DSTransaction

      protected PaymentTransaction identify3DSTransaction(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.TransactionIdentifier transactionIdentifier, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getPayment

      protected Payment getPayment(@NonNull @NonNull PaymentTransaction transactionRequiring3DS, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • identifyChildTransaction

      protected Optional<PaymentTransaction> identifyChildTransaction(@NonNull @NonNull Payment payment, @NonNull @NonNull PaymentTransaction transactionRequiring3DS)
    • buildTransactionLookupRequest

      protected com.broadleafcommerce.paymentgateway.domain.TransactionLookupRequest buildTransactionLookupRequest(@NonNull @NonNull Payment payment, @NonNull @NonNull PaymentTransaction paymentTransaction, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • validateTransactionResults

      protected void validateTransactionResults(@NonNull @NonNull TransactionExecutionResponse transactionResponse, @NonNull @NonNull PaymentTransaction transactionRequiring3DS, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getPaymentGatewayResourceProvider

      protected com.broadleafcommerce.paymentgateway.service.provider.PaymentGatewayResourceProvider getPaymentGatewayResourceProvider()
    • getPaymentTransactionService

      protected PaymentTransactionService<PaymentTransaction> getPaymentTransactionService()
    • getPaymentService

      protected PaymentService<Payment> getPaymentService()
    • getPaymentLockService

      protected PaymentLockService<Payment> getPaymentLockService()
    • getTransactionExecutionUtil

      protected TransactionExecutionUtil getTransactionExecutionUtil()
    • getTransactionExecutionService

      protected TransactionExecutionService getTransactionExecutionService()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()