Class DefaultCustomerPaymentGatewayService
java.lang.Object
org.broadleafcommerce.core.payment.service.DefaultCustomerPaymentGatewayService
- All Implemented Interfaces:
CustomerPaymentGatewayService
@Service("blCustomerPaymentGatewayService")
public class DefaultCustomerPaymentGatewayService
extends Object
implements CustomerPaymentGatewayService
Core framework implementation of the
CustomerPaymentGatewayService.- Author:
- Elbert Bautista (elbertbautista)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AddressServiceprotected CustomerPaymentServiceprotected CustomerServiceprotected PaymentResponseDTOToEntityService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) voiddeleteCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) protected voidpopulateCustomerPayment(CustomerPayment customerPayment, PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) updateCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) protected voidvalidateResponseAndConfig(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config)
-
Field Details
-
addressService
-
customerPaymentService
-
customerService
-
dtoToEntityService
-
-
Constructor Details
-
DefaultCustomerPaymentGatewayService
public DefaultCustomerPaymentGatewayService()
-
-
Method Details
-
createCustomerPaymentFromResponseDTO
public Long createCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException - Specified by:
createCustomerPaymentFromResponseDTOin interfaceCustomerPaymentGatewayService- 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
CustomerPaymententity. - Throws:
IllegalArgumentException
-
updateCustomerPaymentFromResponseDTO
public Long updateCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException - Specified by:
updateCustomerPaymentFromResponseDTOin interfaceCustomerPaymentGatewayService- 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
CustomerPaymententity. - Throws:
IllegalArgumentException
-
deleteCustomerPaymentFromResponseDTO
public void deleteCustomerPaymentFromResponseDTO(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException - Specified by:
deleteCustomerPaymentFromResponseDTOin interfaceCustomerPaymentGatewayService- Parameters:
responseDTO- the response from the gatewayconfig- configuration values for the payment gateway- Throws:
IllegalArgumentException
-
validateResponseAndConfig
protected void validateResponseAndConfig(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
populateCustomerPayment
protected void populateCustomerPayment(CustomerPayment customerPayment, PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config)
-