public class DefaultPaymentFacade extends java.lang.Object implements PaymentFacade
PaymentFacade| Constructor and Description |
|---|
DefaultPaymentFacade() |
| Modifier and Type | Method and Description |
|---|---|
PaymentData |
beginHopCreateSubscription(java.lang.String responseUrl,
java.lang.String merchantCallbackUrl)
Gets the Hosted Order Page request data which includes all data required to create a
subscription (customer profile).
|
PaymentData |
beginSopCreateSubscription(java.lang.String responseUrl,
java.lang.String merchantCallbackUrl)
Gets the Silent Order Post request data which includes all data required to create a
subscription (customer profile).
|
PaymentSubscriptionResultData |
completeHopCreateSubscription(java.util.Map<java.lang.String,java.lang.String> parameters,
boolean saveInAccount)
Called to create a subscription internally with the result parameters obtained from the provider's Hosted Order
Page.
|
PaymentSubscriptionResultData |
completeSopCreateSubscription(java.util.Map<java.lang.String,java.lang.String> parameters,
boolean saveInAccount)
Called to create a subscription internally with the result parameters obtained from the provider's Silent Order
Post.
|
PaymentSubscriptionResultData |
completeSopCreateSubscription(java.util.Map<java.lang.String,java.lang.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 BaseSiteService |
getBaseSiteService() |
protected CheckoutCustomerStrategy |
getCheckoutCustomerStrategy() |
protected java.lang.String |
getCurrentSiteName() |
protected CustomerModel |
getCurrentUserForCheckout() |
protected CustomerAccountService |
getCustomerAccountService() |
protected AddressModel |
getDefaultPaymentAddress(CustomerModel customerModel) |
protected java.lang.String |
getFullResponseUrl(java.lang.String responseUrl,
boolean isSecure)
Resolves a given URL to a full URL including server and port, etc.
|
protected PaymentService |
getPaymentService() |
protected Converter<PaymentSubscriptionResultItem,PaymentSubscriptionResultData> |
getPaymentSubscriptionResultDataConverter() |
protected SiteBaseUrlResolutionService |
getSiteBaseUrlResolutionService() |
protected SiteConfigService |
getSiteConfigService() |
protected UserService |
getUserService() |
void |
setBaseSiteService(BaseSiteService baseSiteService) |
void |
setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy) |
void |
setCustomerAccountService(CustomerAccountService customerAccountService) |
void |
setPaymentService(PaymentService paymentService) |
void |
setPaymentSubscriptionResultDataConverter(Converter<PaymentSubscriptionResultItem,PaymentSubscriptionResultData> paymentSubscriptionResultDataConverter) |
void |
setSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService) |
void |
setSiteConfigService(SiteConfigService siteConfigService) |
void |
setUserService(UserService userService) |
protected CheckoutCustomerStrategy getCheckoutCustomerStrategy()
public void setCheckoutCustomerStrategy(CheckoutCustomerStrategy checkoutCustomerStrategy)
protected BaseSiteService getBaseSiteService()
public void setBaseSiteService(BaseSiteService baseSiteService)
protected SiteBaseUrlResolutionService getSiteBaseUrlResolutionService()
public void setSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService)
protected UserService getUserService()
public void setUserService(UserService userService)
protected PaymentService getPaymentService()
public void setPaymentService(PaymentService paymentService)
protected Converter<PaymentSubscriptionResultItem,PaymentSubscriptionResultData> getPaymentSubscriptionResultDataConverter()
public void setPaymentSubscriptionResultDataConverter(Converter<PaymentSubscriptionResultItem,PaymentSubscriptionResultData> paymentSubscriptionResultDataConverter)
protected SiteConfigService getSiteConfigService()
public void setSiteConfigService(SiteConfigService siteConfigService)
protected CustomerAccountService getCustomerAccountService()
public void setCustomerAccountService(CustomerAccountService customerAccountService)
public PaymentData beginHopCreateSubscription(java.lang.String responseUrl, java.lang.String merchantCallbackUrl)
PaymentFacadebeginHopCreateSubscription in interface PaymentFacaderesponseUrl - - requires a HostedOrderPageRequest object containing all the request data.merchantCallbackUrl - - The URL of the MerchantCallbackController used by the Provider to send validation responses.PaymentData object which contains all data required to create a subscription.public PaymentData beginSopCreateSubscription(java.lang.String responseUrl, java.lang.String merchantCallbackUrl)
PaymentFacadebeginSopCreateSubscription in interface PaymentFacaderesponseUrl - - requires a HostedOrderPageRequest object containing all the request data.merchantCallbackUrl - - The URL of the MerchantCallbackController used by the Provider to send validation responses.PaymentData object which contains all data required to create a subscription.public PaymentSubscriptionResultData completeHopCreateSubscription(java.util.Map<java.lang.String,java.lang.String> parameters, boolean saveInAccount)
PaymentFacadecompleteHopCreateSubscription in interface PaymentFacadeparameters - - 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 assignedCCPaymentInfoData object representing the subscription created by the HOP/SOP response.public PaymentSubscriptionResultData completeSopCreateSubscription(java.util.Map<java.lang.String,java.lang.String> parameters, boolean saveInAccount)
PaymentFacadecompleteSopCreateSubscription in interface PaymentFacadeparameters - - 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 assignedCCPaymentInfoData object representing the subscription created by the HOP/SOP response.public PaymentSubscriptionResultData completeSopCreateSubscription(java.util.Map<java.lang.String,java.lang.String> parameters, boolean saveInAccount, boolean defaultPayment)
PaymentFacadecompleteSopCreateSubscription in interface PaymentFacadeparameters - - 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 notCCPaymentInfoData object representing the subscription created by the HOP/SOP response.protected AddressModel getDefaultPaymentAddress(CustomerModel customerModel)
protected java.lang.String getCurrentSiteName()
protected java.lang.String getFullResponseUrl(java.lang.String responseUrl,
boolean isSecure)
responseUrl - - the URL to resolveisSecure - - flag to indicate whether the final URL should use a secure connection or not.protected CustomerModel getCurrentUserForCheckout()
Copyright © 2018 SAP SE. All Rights Reserved.