Class DefaultPaymentFacade
java.lang.Object
de.hybris.platform.acceleratorfacades.payment.impl.DefaultPaymentFacade
- All Implemented Interfaces:
PaymentFacade
- Direct Known Subclasses:
DefaultCommerceWebServicesPaymentFacade,DefaultCommerceWebServicesPaymentFacade
Default implementation of
PaymentFacade-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeginHopCreateSubscription(String responseUrl, String merchantCallbackUrl) Gets the Hosted Order Page request data which includes all data required to create a subscription (customer profile).beginSopCreateSubscription(String responseUrl, String merchantCallbackUrl) Gets the Silent Order Post request data which includes all data required to create a subscription (customer profile).completeHopCreateSubscription(Map<String, String> parameters, boolean saveInAccount) Called to create a subscription internally with the result parameters obtained from the provider's Hosted Order Page.completeSopCreateSubscription(Map<String, String> parameters, boolean saveInAccount) Called to create a subscription internally with the result parameters obtained from the provider's Silent Order Post.completeSopCreateSubscription(Map<String, String> parameters, boolean saveInAccount, boolean defaultPayment) Called to create a subscription internally with the result parameters obtained from the provider's Silent Order Post.protected BaseSiteServiceprotected CheckoutCustomerStrategyprotected Stringprotected CustomerModelprotected CustomerAccountServiceprotected AddressModelgetDefaultPaymentAddress(CustomerModel customerModel) protected StringgetFullResponseUrl(String responseUrl, boolean isSecure) Resolves a given URL to a full URL including server and port, etc.protected PaymentServiceprotected SiteBaseUrlResolutionServiceprotected SiteConfigServiceprotected UserServicevoidsetBaseSiteService(BaseSiteService baseSiteService) voidsetCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy) voidsetCustomerAccountService(CustomerAccountService customerAccountService) voidsetPaymentService(PaymentService paymentService) voidsetPaymentSubscriptionResultDataConverter(Converter<PaymentSubscriptionResultItem, PaymentSubscriptionResultData> paymentSubscriptionResultDataConverter) voidsetSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService) voidsetSiteConfigService(SiteConfigService siteConfigService) voidsetUserService(UserService userService)
-
Constructor Details
-
DefaultPaymentFacade
public DefaultPaymentFacade()
-
-
Method Details
-
getCheckoutCustomerStrategy
-
setCheckoutCustomerStrategy
-
getBaseSiteService
-
setBaseSiteService
-
getSiteBaseUrlResolutionService
-
setSiteBaseUrlResolutionService
public void setSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService) -
getUserService
-
setUserService
-
getPaymentService
-
setPaymentService
-
getPaymentSubscriptionResultDataConverter
protected Converter<PaymentSubscriptionResultItem,PaymentSubscriptionResultData> getPaymentSubscriptionResultDataConverter() -
setPaymentSubscriptionResultDataConverter
public void setPaymentSubscriptionResultDataConverter(Converter<PaymentSubscriptionResultItem, PaymentSubscriptionResultData> paymentSubscriptionResultDataConverter) -
getSiteConfigService
-
setSiteConfigService
-
getCustomerAccountService
-
setCustomerAccountService
-
beginHopCreateSubscription
Description copied from interface:PaymentFacadeGets the Hosted Order Page request data which includes all data required to create a subscription (customer profile).- Specified by:
beginHopCreateSubscriptionin interfacePaymentFacade- Parameters:
responseUrl- - requires aHostedOrderPageRequestobject containing all the request data.merchantCallbackUrl- - The URL of the MerchantCallbackController used by the Provider to send validation responses.- Returns:
- a
PaymentDataobject which contains all data required to create a subscription.
-
beginSopCreateSubscription
Description copied from interface:PaymentFacadeGets the Silent Order Post request data which includes all data required to create a subscription (customer profile).- Specified by:
beginSopCreateSubscriptionin interfacePaymentFacade- Parameters:
responseUrl- - requires aHostedOrderPageRequestobject containing all the request data.merchantCallbackUrl- - The URL of the MerchantCallbackController used by the Provider to send validation responses.- Returns:
- a
PaymentDataobject which contains all data required to create a subscription.
-
completeHopCreateSubscription
public PaymentSubscriptionResultData completeHopCreateSubscription(Map<String, String> parameters, boolean saveInAccount) Description copied from interface:PaymentFacadeCalled to create a subscription internally with the result parameters obtained from the provider's Hosted Order Page.- Specified by:
completeHopCreateSubscriptionin interfacePaymentFacade- 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
CCPaymentInfoDataobject representing the subscription created by the HOP/SOP response.
-
completeSopCreateSubscription
public PaymentSubscriptionResultData completeSopCreateSubscription(Map<String, String> parameters, boolean saveInAccount) Description copied from interface:PaymentFacadeCalled to create a subscription internally with the result parameters obtained from the provider's Silent Order Post.- Specified by:
completeSopCreateSubscriptionin interfacePaymentFacade- 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
CCPaymentInfoDataobject 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:PaymentFacadeCalled to create a subscription internally with the result parameters obtained from the provider's Silent Order Post.- Specified by:
completeSopCreateSubscriptionin interfacePaymentFacade- 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 assigneddefaultPayment- - a flag to tell whether the created PaymentInfo should be made default or not- Returns:
- - a
CCPaymentInfoDataobject representing the subscription created by the HOP/SOP response.
-
getDefaultPaymentAddress
-
getCurrentSiteName
- Returns:
- the name of the current base site.
-
getFullResponseUrl
Resolves a given URL to a full URL including server and port, etc.- Parameters:
responseUrl- - the URL to resolveisSecure- - 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
-