Interface PaymentProcessingService<P extends BillingProcessingRequest>

All Known Implementing Classes:
DefaultPaymentProcessingService

public interface PaymentProcessingService<P extends BillingProcessingRequest>
  • Method Summary

    Modifier and Type
    Method
    Description
    processPayments(String paymentGatewayType, List<P> requests, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    For each request in the list, verifies that this is the first attempt to process the transaction by persisting a new PaymentTransactionDetail.
    resolveUnknownPaymentGatewayResponses(List<P> requests, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Resolves unknown gateway responses by looking up the results from the processor.
  • Method Details

    • processPayments

      List<P> processPayments(String paymentGatewayType, List<P> requests, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      For each request in the list, verifies that this is the first attempt to process the transaction by persisting a new PaymentTransactionDetail. If a transaction has not been attempted before, calls the PaymentTransactionExecutionService and saves the result on the request.

      If this transaction has been attempted before, in certain circumstances resends the request to the next stage.

      Parameters:
      paymentGatewayType - type of gateway to execute the payment
      requests - the list of billing processing requests describing the payment methods & amounts to be charged
      contextInfo - context information around multi-tenant state
      Returns:
      The list of billing processing requests that should be sent to PaymentProcessingResultHandlerService
    • resolveUnknownPaymentGatewayResponses

      List<P> resolveUnknownPaymentGatewayResponses(List<P> requests, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Resolves unknown gateway responses by looking up the results from the processor. If the processor is not aware of the transaction, uses BillingJobProperties.paymentGatewayConfig configuration to decide whether to attempt retrying the transaction.
      Parameters:
      requests - the list of billing processing requests describing the payment methods & billing attempts that are missing gateway responses
      contextInfo - context information around multi-tenant state
      Returns:
      The list of updated billing processing requests that should be sent to PaymentProcessingResultHandlerService