Class DefaultPaymentFacade

java.lang.Object
de.hybris.platform.acceleratorfacades.payment.impl.DefaultPaymentFacade
All Implemented Interfaces:
PaymentFacade
Direct Known Subclasses:
DefaultCommerceWebServicesPaymentFacade, DefaultCommerceWebServicesPaymentFacade

public class DefaultPaymentFacade extends Object implements PaymentFacade
Default implementation of PaymentFacade
  • Constructor Details

    • DefaultPaymentFacade

      public DefaultPaymentFacade()
  • Method Details

    • getCheckoutCustomerStrategy

      protected CheckoutCustomerStrategy getCheckoutCustomerStrategy()
    • setCheckoutCustomerStrategy

      public void setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy)
    • getBaseSiteService

      protected BaseSiteService getBaseSiteService()
    • setBaseSiteService

      public void setBaseSiteService(BaseSiteService baseSiteService)
    • getSiteBaseUrlResolutionService

      protected SiteBaseUrlResolutionService getSiteBaseUrlResolutionService()
    • setSiteBaseUrlResolutionService

      public void setSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService)
    • getUserService

      protected UserService getUserService()
    • setUserService

      public void setUserService(UserService userService)
    • getPaymentService

      protected PaymentService getPaymentService()
    • setPaymentService

      public void setPaymentService(PaymentService paymentService)
    • getPaymentSubscriptionResultDataConverter

      protected Converter<PaymentSubscriptionResultItem,PaymentSubscriptionResultData> getPaymentSubscriptionResultDataConverter()
    • setPaymentSubscriptionResultDataConverter

      public void setPaymentSubscriptionResultDataConverter(Converter<PaymentSubscriptionResultItem,PaymentSubscriptionResultData> paymentSubscriptionResultDataConverter)
    • getSiteConfigService

      protected SiteConfigService getSiteConfigService()
    • setSiteConfigService

      public void setSiteConfigService(SiteConfigService siteConfigService)
    • getCustomerAccountService

      protected CustomerAccountService getCustomerAccountService()
    • setCustomerAccountService

      public void setCustomerAccountService(CustomerAccountService customerAccountService)
    • beginHopCreateSubscription

      public PaymentData beginHopCreateSubscription(String responseUrl, String merchantCallbackUrl)
      Description copied from interface: PaymentFacade
      Gets the Hosted Order Page request data which includes all data required to create a subscription (customer profile).
      Specified by:
      beginHopCreateSubscription in interface PaymentFacade
      Parameters:
      responseUrl - - requires a HostedOrderPageRequest object containing all the request data.
      merchantCallbackUrl - - The URL of the MerchantCallbackController used by the Provider to send validation responses.
      Returns:
      a PaymentData object which contains all data required to create a subscription.
    • beginSopCreateSubscription

      public PaymentData beginSopCreateSubscription(String responseUrl, String merchantCallbackUrl)
      Description copied from interface: PaymentFacade
      Gets the Silent Order Post request data which includes all data required to create a subscription (customer profile).
      Specified by:
      beginSopCreateSubscription in interface PaymentFacade
      Parameters:
      responseUrl - - requires a HostedOrderPageRequest object containing all the request data.
      merchantCallbackUrl - - The URL of the MerchantCallbackController used by the Provider to send validation responses.
      Returns:
      a PaymentData object which contains all data required to create a subscription.
    • completeHopCreateSubscription

      public PaymentSubscriptionResultData completeHopCreateSubscription(Map<String,String> parameters, boolean saveInAccount)
      Description copied from interface: PaymentFacade
      Called to create a subscription internally with the result parameters obtained from the provider's Hosted Order Page.
      Specified by:
      completeHopCreateSubscription in interface PaymentFacade
      Parameters:
      parameters - - a Map of key-value paired Strings with the result data returned from the HOP/SOP response.
      saveInAccount - - a Flag to tell if the PaymentInfo created should saved to the account. During guest checkout the Anonymous user should not hav the PaymentInfos assigned
      Returns:
      - a CCPaymentInfoData object representing the subscription created by the HOP/SOP response.
    • completeSopCreateSubscription

      public PaymentSubscriptionResultData completeSopCreateSubscription(Map<String,String> parameters, boolean saveInAccount)
      Description copied from interface: PaymentFacade
      Called to create a subscription internally with the result parameters obtained from the provider's Silent Order Post.
      Specified by:
      completeSopCreateSubscription in interface PaymentFacade
      Parameters:
      parameters - - a Map of key-value paired Strings with the result data returned from the HOP/SOP response.
      saveInAccount - - a Flag to tell if the PaymentInfo created should saved to the account. During guest checkout the Anonymous user should not hav the PaymentInfos assigned
      Returns:
      - a CCPaymentInfoData object representing the subscription created by the HOP/SOP response.
    • completeSopCreateSubscription

      public PaymentSubscriptionResultData completeSopCreateSubscription(Map<String,String> parameters, boolean saveInAccount, boolean defaultPayment)
      Description copied from interface: PaymentFacade
      Called to create a subscription internally with the result parameters obtained from the provider's Silent Order Post.
      Specified by:
      completeSopCreateSubscription in interface PaymentFacade
      Parameters:
      parameters - - a Map of key-value paired Strings with the result data returned from the HOP/SOP response.
      saveInAccount - - a Flag to tell if the PaymentInfo created should saved to the account. During guest checkout the Anonymous user should not hav the PaymentInfos assigned
      defaultPayment - - a flag to tell whether the created PaymentInfo should be made default or not
      Returns:
      - a CCPaymentInfoData object representing the subscription created by the HOP/SOP response.
    • getDefaultPaymentAddress

      protected AddressModel getDefaultPaymentAddress(CustomerModel customerModel)
    • getCurrentSiteName

      protected String getCurrentSiteName()
      Returns:
      the name of the current base site.
    • getFullResponseUrl

      protected String getFullResponseUrl(String responseUrl, boolean isSecure)
      Resolves a given URL to a full URL including server and port, etc.
      Parameters:
      responseUrl - - the URL to resolve
      isSecure - - flag to indicate whether the final URL should use a secure connection or not.
      Returns:
      a full URL including HTTP protocol, server, port, path etc.
    • getCurrentUserForCheckout

      protected CustomerModel getCurrentUserForCheckout()