Interface PaymentGatewayConfigurationServiceProvider
- All Known Implementing Classes:
PaymentGatewayConfigurationServiceProviderImpl
This represents the main servic bus for grabbing configurations to configured payment gateways to execute service calls
programmatically. The main use for this in the framework is in
org.broadleafcommerce.core.checkout.service.workflow.ValidateAndConfirmPaymentActivity and its rollback handler
org.broadleafcommerce.core.checkout.service.workflow.ConfirmPaymentsRollbackHandler. Since multiple gateways
can be configured for a single implementation (like Paypal Express and Braintree, or Paypal Express, a credit card
module and a gift card module) this allows you to select between them to perform additional operations on a payment
transaction.
Once you obtain the correct gateway configuration bean, you can then obtain links to each service to perform individual
operations like PaymentGatewayTransactionService or PaymentGatewayFraudService.
- Author:
- Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptiongetGatewayConfigurationService(PaymentGatewayType gatewayType) Returns the firstPaymentGatewayConfigurationServicethat matches the givenPaymentGatewayType.voidsetGatewayConfigurationServices(List<PaymentGatewayConfigurationService> gatewayConfigurationServices)
-
Method Details
-
getGatewayConfigurationService
PaymentGatewayConfigurationService getGatewayConfigurationService(@Nonnull PaymentGatewayType gatewayType) Returns the first
PaymentGatewayConfigurationServicethat matches the givenPaymentGatewayType. Useful when you need a particularPaymentGatewayConfigurationServiceto communicate in different ways to a payment gateway.- Throws:
IllegalArgumentException- if the givenPaymentGatewayTypeis null or if there is no configuration for the givenPaymentGatewayType.
-
getGatewayConfigurationServices
List<PaymentGatewayConfigurationService> getGatewayConfigurationServices() -
setGatewayConfigurationServices
void setGatewayConfigurationServices(List<PaymentGatewayConfigurationService> gatewayConfigurationServices)
-