Interface PaymentProcessingService<P extends BillingProcessingRequest>
- All Known Implementing Classes:
DefaultPaymentProcessingService
public interface PaymentProcessingService<P extends BillingProcessingRequest>
-
Method Summary
Modifier and TypeMethodDescriptionprocessPayments(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 newPaymentTransactionDetail.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 newPaymentTransactionDetail. If a transaction has not been attempted before, calls thePaymentTransactionExecutionServiceand 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 paymentrequests- the list ofbilling processing requestsdescribing the payment methods & amounts to be chargedcontextInfo- context information around multi-tenant state- Returns:
- The list of
billing processing requeststhat should be sent toPaymentProcessingResultHandlerService
-
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, usesBillingJobProperties.paymentGatewayConfigconfiguration to decide whether to attempt retrying the transaction.- Parameters:
requests- the list ofbilling processing requestsdescribing the payment methods & billing attempts that are missing gateway responsescontextInfo- context information around multi-tenant state- Returns:
- The list of updated
billing processing requeststhat should be sent toPaymentProcessingResultHandlerService
-