Interface CustomerPaymentGatewayService
- All Known Implementing Classes:
DefaultCustomerPaymentGatewayService
public interface CustomerPaymentGatewayService
The default implementation of this interface is represented in the core Broadleaf framework at
DefaultCustomerPaymentGatewayService
. This is designed as
a generic contract for allowing payment modules to tokenize payments and add it to a customer profile
represented in Broadleaf while still staying decoupled from any of the Broadleaf core framework concepts.
These service methods are usually invoked from the controller that listens to the endpoint hit by the external payment
provider (which should be a subclass of CustomerPaymentGatewayAbstractController
).
- Author:
- Elbert Bautista (elbertbautista)
-
Method Summary
Modifier and TypeMethodDescriptioncreateCustomerPaymentFromResponseDTO
(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) void
deleteCustomerPaymentFromResponseDTO
(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) updateCustomerPaymentFromResponseDTO
(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config)
-
Method Details
-
createCustomerPaymentFromResponseDTO
Long createCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException - Parameters:
responseDTO
- the response from the gatewayconfig
- configuration values for the payment gateway- Returns:
- a unique ID of the customer payment token as it is saved in the core commerce engine. If using Broadleaf's
core commerce engine, it will be the ID of the created
CustomerPayment
entity. - Throws:
IllegalArgumentException
-
updateCustomerPaymentFromResponseDTO
Long updateCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException - Parameters:
responseDTO
- the response from the gatewayconfig
- configuration values for the payment gateway- Returns:
- a unique ID of the customer payment token as it is saved in the core commerce engine. If using Broadleaf's
core commerce engine, it will be the ID of the created
CustomerPayment
entity. - Throws:
IllegalArgumentException
-
deleteCustomerPaymentFromResponseDTO
void deleteCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException - Parameters:
responseDTO
- the response from the gatewayconfig
- configuration values for the payment gateway- Throws:
IllegalArgumentException
-