Interface CustomizedPaymentTransactionRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

All Known Subinterfaces:
JpaPaymentTransactionRepository<D>, PaymentTransactionRepository<D>
All Known Implementing Classes:
JpaCustomizedPaymentTransactionRepository

public interface CustomizedPaymentTransactionRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to payment transaction maintenance and filtering.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<D>
    findAllByDateRecordedBeforeAndManagementStateIsNotIn(Instant date, List<String> transactionManagementStates, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Returns the transactions recorded before the the specified time, excluding those with the specified management states
    Finds the payment transaction by the context id and tenant id, ignoring other context filtering like archival status.
    findByGatewayTransactionIdAndTenantId(String gatewayTransactionId, String tenantId)
    Finds the payment transaction by the gateway transaction id and tenant id, ignoring other context filtering like archival status.
    findByTransactionReferenceIdAndTenantId(String transactionReferenceId, String tenantId)
    Finds the payment transaction by the transaction reference id and tenant id, ignoring other context filtering like archival status.
    org.springframework.data.domain.Page<D>
    findTransactionsToReverse(Duration reversalCandidateTtl, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Returns the payment transactions that are eligible for reverse.
  • Method Details

    • findAllByDateRecordedBeforeAndManagementStateIsNotIn

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findAllByDateRecordedBeforeAndManagementStateIsNotIn(Instant date, List<String> transactionManagementStates, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Returns the transactions recorded before the the specified time, excluding those with the specified management states
      Parameters:
      date - the date until which the transaction was recorded
      transactionManagementStates - the excluded management states for the transactions
      pageable - The requested page of results from the database.
      context - Request context information around sandbox and multitenant state
      Returns:
      the transactions excluding those with the specified management states
    • findTransactionsToReverse

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findTransactionsToReverse(Duration reversalCandidateTtl, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Returns the payment transactions that are eligible for reverse. By default this method returns the transaction with DefaultTransactionStatuses.SUCCESS status, DefaultTransactionManagementStates.REVERSAL_CANDIDATE management state and that have not been updated within a specified duration.

      If the transaction management state is DefaultTransactionManagementStates.REQUIRES_REVERSAL the update time is not considered.

      Parameters:
      reversalCandidateTtl - the amount of time the payment transactions have not been updated and can be reversed
      page - The requested page of results from the database
      context - context information related to multitenancy
      Returns:
      the payment transactions that are eligible for reversal
      See Also:
    • findByTransactionReferenceIdAndTenantId

      @Policy(operationTypes=READ) Optional<D> findByTransactionReferenceIdAndTenantId(String transactionReferenceId, String tenantId)
      Finds the payment transaction by the transaction reference id and tenant id, ignoring other context filtering like archival status.
      Parameters:
      transactionReferenceId - the transaction id known by the payment gateway
      tenantId - the tenant context of this payment transaction
      Returns:
      the transaction if found
    • findByGatewayTransactionIdAndTenantId

      @Policy(operationTypes=READ) Optional<D> findByGatewayTransactionIdAndTenantId(String gatewayTransactionId, String tenantId)
      Finds the payment transaction by the gateway transaction id and tenant id, ignoring other context filtering like archival status.
      Parameters:
      gatewayTransactionId - The id of the payment gateway's transaction representation
      tenantId - the tenant context of this payment transaction
      Returns:
      the transaction if found
    • findByContextIdAndTenantId

      @Policy(operationTypes=READ) Optional<D> findByContextIdAndTenantId(String contextId, String tenantId)
      Finds the payment transaction by the context id and tenant id, ignoring other context filtering like archival status.
      Parameters:
      contextId - The context id of the payment transaction
      tenantId - the tenant context of this payment transaction
      Returns:
      the transaction if found