Class DefaultCreateSubscriptionRequestStrategy
- java.lang.Object
-
- de.hybris.platform.acceleratorservices.payment.cybersource.strategies.impl.DefaultCreateSubscriptionRequestStrategy
-
- All Implemented Interfaces:
CreateSubscriptionRequestStrategy
public class DefaultCreateSubscriptionRequestStrategy extends java.lang.Object implements CreateSubscriptionRequestStrategy
-
-
Constructor Summary
Constructors Constructor Description DefaultCreateSubscriptionRequestStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateSubscriptionRequestcreateSubscriptionRequest(java.lang.String siteName, java.lang.String requestUrl, java.lang.String responseUrl, java.lang.String merchantCallbackUrl, CustomerModel customerModel, CreditCardPaymentInfoModel cardInfo, AddressModel paymentAddress)protected CartServicegetCartService()protected Converter<AddressModel,CustomerBillToData>getCustomerBillToDataConverter()protected CustomerEmailResolutionServicegetCustomerEmailResolutionService()protected Converter<CartModel,CustomerShipToData>getCustomerShipToDataConverter()protected OrderPageAppearanceDatagetHostedOrderPageAppearanceConfiguration()protected java.lang.StringgetHostedOrderPageTestCurrency()This method is used to get the ISO currency code configured for the CyberSource Test Hosted Order Page configured in the Business Centre.protected java.lang.StringgetHostedOrderPageVersion()protected java.lang.StringgetMerchantId()Gets the CyberSource merchant ID.protected OrderPageConfirmationDatagetOrderPageConfirmationData(java.lang.String responseUrl, java.lang.String merchantCallbackUrl)protected Converter<CreditCardPaymentInfoModel,PaymentInfoData>getPaymentInfoDataConverter()protected OrderInfoDatagetRequestOrderInfoData(TransactionTypeEnum transactionType)protected SignatureDatagetRequestSignatureData()protected SubscriptionSignatureDatagetRequestSubscriptionSignatureData(SubscriptionFrequencyEnum frequencyEnum)protected java.lang.StringgetSerialNumber()Gets the CyberSource merchant's serial number that is used to encrypt and validate connections.protected java.math.BigDecimalgetSetupFeeAmount()Gets the CyberSource setup fee, currently populated by a config value.protected java.lang.StringgetSharedSecret()Gets the CyberSource merchant's shared secret that is used to encrypt and validate connections.protected java.lang.StringgetSiteConfigProperty(java.lang.String key)protected SiteConfigServicegetSiteConfigService()voidsetCartService(CartService cartService)voidsetCustomerBillToDataConverter(Converter<AddressModel,CustomerBillToData> customerBillToDataConverter)voidsetCustomerEmailResolutionService(CustomerEmailResolutionService customerEmailResolutionService)voidsetCustomerShipToDataConverter(Converter<CartModel,CustomerShipToData> customerShipToDataConverter)protected voidsetEmailAddress(CustomerBillToData customerBillToData, CustomerModel customer)voidsetHostedOrderPageVersion(java.lang.String hostedOrderPageVersion)voidsetPaymentInfoDataConverter(Converter<CreditCardPaymentInfoModel,PaymentInfoData> paymentInfoDataConverter)voidsetSiteConfigService(SiteConfigService siteConfigService)
-
-
-
Method Detail
-
createSubscriptionRequest
public CreateSubscriptionRequest createSubscriptionRequest(java.lang.String siteName, java.lang.String requestUrl, java.lang.String responseUrl, java.lang.String merchantCallbackUrl, CustomerModel customerModel, CreditCardPaymentInfoModel cardInfo, AddressModel paymentAddress)
- Specified by:
createSubscriptionRequestin interfaceCreateSubscriptionRequestStrategy
-
setEmailAddress
protected void setEmailAddress(CustomerBillToData customerBillToData, CustomerModel customer)
-
getRequestOrderInfoData
protected OrderInfoData getRequestOrderInfoData(TransactionTypeEnum transactionType)
-
getRequestSignatureData
protected SignatureData getRequestSignatureData()
-
getRequestSubscriptionSignatureData
protected SubscriptionSignatureData getRequestSubscriptionSignatureData(SubscriptionFrequencyEnum frequencyEnum)
-
getHostedOrderPageAppearanceConfiguration
protected OrderPageAppearanceData getHostedOrderPageAppearanceConfiguration()
-
getOrderPageConfirmationData
protected OrderPageConfirmationData getOrderPageConfirmationData(java.lang.String responseUrl, java.lang.String merchantCallbackUrl)
-
getHostedOrderPageVersion
protected java.lang.String getHostedOrderPageVersion()
-
setHostedOrderPageVersion
public void setHostedOrderPageVersion(java.lang.String hostedOrderPageVersion)
-
getHostedOrderPageTestCurrency
protected java.lang.String getHostedOrderPageTestCurrency()
This method is used to get the ISO currency code configured for the CyberSource Test Hosted Order Page configured in the Business Centre. This may be different to the currency being used for the live account.- Returns:
- a three character representing the currency ISO code.
-
getSiteConfigProperty
protected java.lang.String getSiteConfigProperty(java.lang.String key)
-
getSetupFeeAmount
protected java.math.BigDecimal getSetupFeeAmount()
Gets the CyberSource setup fee, currently populated by a config value.- Returns:
- the CyberSource setup fee amount
-
getMerchantId
protected java.lang.String getMerchantId()
Gets the CyberSource merchant ID.- Returns:
- the CyberSource merchant ID
-
getSerialNumber
protected java.lang.String getSerialNumber()
Gets the CyberSource merchant's serial number that is used to encrypt and validate connections.- Returns:
- the serial number downloaded from the CyberSource Business Centre.
-
getSharedSecret
protected java.lang.String getSharedSecret()
Gets the CyberSource merchant's shared secret that is used to encrypt and validate connections.- Returns:
- the shared secret downloaded from the CyberSource Business Centre.
-
getCartService
protected CartService getCartService()
-
setCartService
public void setCartService(CartService cartService)
-
getCustomerBillToDataConverter
protected Converter<AddressModel,CustomerBillToData> getCustomerBillToDataConverter()
-
setCustomerBillToDataConverter
public void setCustomerBillToDataConverter(Converter<AddressModel,CustomerBillToData> customerBillToDataConverter)
-
getCustomerShipToDataConverter
protected Converter<CartModel,CustomerShipToData> getCustomerShipToDataConverter()
-
setCustomerShipToDataConverter
public void setCustomerShipToDataConverter(Converter<CartModel,CustomerShipToData> customerShipToDataConverter)
-
getCustomerEmailResolutionService
protected CustomerEmailResolutionService getCustomerEmailResolutionService()
-
setCustomerEmailResolutionService
public void setCustomerEmailResolutionService(CustomerEmailResolutionService customerEmailResolutionService)
-
getPaymentInfoDataConverter
protected Converter<CreditCardPaymentInfoModel,PaymentInfoData> getPaymentInfoDataConverter()
-
setPaymentInfoDataConverter
public void setPaymentInfoDataConverter(Converter<CreditCardPaymentInfoModel,PaymentInfoData> paymentInfoDataConverter)
-
getSiteConfigService
protected SiteConfigService getSiteConfigService()
-
setSiteConfigService
public void setSiteConfigService(SiteConfigService siteConfigService)
-
-