Class PaymentResponseDTOToEntityServiceImpl

java.lang.Object
org.broadleafcommerce.core.payment.service.PaymentResponseDTOToEntityServiceImpl
All Implemented Interfaces:
PaymentResponseDTOToEntityService

@Service("blPaymentResponseDTOToEntityService") public class PaymentResponseDTOToEntityServiceImpl extends Object implements PaymentResponseDTOToEntityService
Author:
Elbert Bautista (elbertbautista)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.broadleafcommerce.profile.core.service.AddressService
     
    protected org.broadleafcommerce.profile.core.service.CountryService
     
    protected org.broadleafcommerce.profile.core.service.CountrySubdivisionService
     
     
    protected org.broadleafcommerce.common.i18n.service.ISOService
     
    protected org.broadleafcommerce.profile.core.service.PhoneService
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    populateAddressInfo(org.broadleafcommerce.common.payment.dto.AddressDTO<org.broadleafcommerce.common.payment.dto.PaymentResponseDTO> dto, org.broadleafcommerce.profile.core.domain.Address address)
     
    void
    populateBillingInfo(org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO, OrderPayment payment, org.broadleafcommerce.profile.core.domain.Address tempBillingAddress, boolean isUseBillingAddressFromGateway)
     
    void
    populateCustomerPaymentToken(org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO, org.broadleafcommerce.profile.core.domain.CustomerPayment customerPayment)
    Will attempt to populate the CustomerPayment.setPaymentToken(String) by first looking at the response map for key PaymentAdditionalFieldType.TOKEN.
    void
    populateShippingInfo(org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO, Order order)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • addressService

      protected org.broadleafcommerce.profile.core.service.AddressService addressService
    • countryService

      protected org.broadleafcommerce.profile.core.service.CountryService countryService
    • isoService

      protected org.broadleafcommerce.common.i18n.service.ISOService isoService
    • phoneService

      protected org.broadleafcommerce.profile.core.service.PhoneService phoneService
    • fulfillmentGroupService

      protected FulfillmentGroupService fulfillmentGroupService
    • countrySubdivisionService

      protected org.broadleafcommerce.profile.core.service.CountrySubdivisionService countrySubdivisionService
  • Constructor Details

    • PaymentResponseDTOToEntityServiceImpl

      public PaymentResponseDTOToEntityServiceImpl()
  • Method Details

    • populateBillingInfo

      public void populateBillingInfo(org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO, OrderPayment payment, org.broadleafcommerce.profile.core.domain.Address tempBillingAddress, boolean isUseBillingAddressFromGateway)
      Specified by:
      populateBillingInfo in interface PaymentResponseDTOToEntityService
    • populateShippingInfo

      public void populateShippingInfo(org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO, Order order)
      Specified by:
      populateShippingInfo in interface PaymentResponseDTOToEntityService
    • populateAddressInfo

      public void populateAddressInfo(org.broadleafcommerce.common.payment.dto.AddressDTO<org.broadleafcommerce.common.payment.dto.PaymentResponseDTO> dto, org.broadleafcommerce.profile.core.domain.Address address)
      Specified by:
      populateAddressInfo in interface PaymentResponseDTOToEntityService
    • populateCustomerPaymentToken

      public void populateCustomerPaymentToken(org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO, org.broadleafcommerce.profile.core.domain.CustomerPayment customerPayment)
      Description copied from interface: PaymentResponseDTOToEntityService

      Will attempt to populate the CustomerPayment.setPaymentToken(String) by first looking at the response map for key PaymentAdditionalFieldType.TOKEN. If not found, it will next look and see if a Credit Card is populated on the response and will attempt to get the CreditCardDTO.getCreditCardNum()

      Usually used during a tokenization flow when there is a direct response from the gateway (e.g. transparent redirect) outside the scope of a checkout flow.

      Specified by:
      populateCustomerPaymentToken in interface PaymentResponseDTOToEntityService