Class DefaultPaymentFacade

    • Constructor Detail

      • DefaultPaymentFacade

        public DefaultPaymentFacade()
    • Method Detail

      • setCheckoutCustomerStrategy

        public void setCheckoutCustomerStrategy​(CheckoutCustomerStrategy checkoutCustomerStrategy)
      • setBaseSiteService

        public void setBaseSiteService​(BaseSiteService baseSiteService)
      • setSiteBaseUrlResolutionService

        public void setSiteBaseUrlResolutionService​(SiteBaseUrlResolutionService siteBaseUrlResolutionService)
      • getUserService

        protected UserService getUserService()
      • setUserService

        public void setUserService​(UserService userService)
      • setPaymentService

        public void setPaymentService​(PaymentService paymentService)
      • setSiteConfigService

        public void setSiteConfigService​(SiteConfigService siteConfigService)
      • setCustomerAccountService

        public void setCustomerAccountService​(CustomerAccountService customerAccountService)
      • beginHopCreateSubscription

        public PaymentData beginHopCreateSubscription​(java.lang.String responseUrl,
                                                      java.lang.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​(java.lang.String responseUrl,
                                                      java.lang.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​(java.util.Map<java.lang.String,​java.lang.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​(java.util.Map<java.lang.String,​java.lang.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​(java.util.Map<java.lang.String,​java.lang.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.
      • getCurrentSiteName

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

        protected java.lang.String getFullResponseUrl​(java.lang.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()