Class DefaultCreateSubscriptionRequestStrategy
java.lang.Object
de.hybris.platform.acceleratorservices.payment.cybersource.strategies.impl.DefaultCreateSubscriptionRequestStrategy
- All Implemented Interfaces:
CreateSubscriptionRequestStrategy
public class DefaultCreateSubscriptionRequestStrategy
extends Object
implements CreateSubscriptionRequestStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSubscriptionRequest(String siteName, String requestUrl, String responseUrl, String merchantCallbackUrl, CustomerModel customerModel, CreditCardPaymentInfoModel cardInfo, AddressModel paymentAddress) protected CartServiceprotected Converter<AddressModel,CustomerBillToData> protected CustomerEmailResolutionServiceprotected Converter<CartModel,CustomerShipToData> protected OrderPageAppearanceDataprotected StringThis method is used to get the ISO currency code configured for the CyberSource Test Hosted Order Page configured in the Business Centre.protected Stringprotected StringGets the CyberSource merchant ID.protected OrderPageConfirmationDatagetOrderPageConfirmationData(String responseUrl, String merchantCallbackUrl) protected Converter<CreditCardPaymentInfoModel,PaymentInfoData> protected OrderInfoDatagetRequestOrderInfoData(TransactionTypeEnum transactionType) protected SignatureDataprotected SubscriptionSignatureDatagetRequestSubscriptionSignatureData(SubscriptionFrequencyEnum frequencyEnum) protected StringGets the CyberSource merchant's serial number that is used to encrypt and validate connections.protected BigDecimalGets the CyberSource setup fee, currently populated by a config value.protected StringGets the CyberSource merchant's shared secret that is used to encrypt and validate connections.protected Stringprotected SiteConfigServicevoidsetCartService(CartService cartService) voidsetCustomerBillToDataConverter(Converter<AddressModel, CustomerBillToData> customerBillToDataConverter) voidsetCustomerEmailResolutionService(CustomerEmailResolutionService customerEmailResolutionService) voidsetCustomerShipToDataConverter(Converter<CartModel, CustomerShipToData> customerShipToDataConverter) protected voidsetEmailAddress(CustomerBillToData customerBillToData, CustomerModel customer) voidsetHostedOrderPageVersion(String hostedOrderPageVersion) voidsetPaymentInfoDataConverter(Converter<CreditCardPaymentInfoModel, PaymentInfoData> paymentInfoDataConverter) voidsetSiteConfigService(SiteConfigService siteConfigService)
-
Constructor Details
-
DefaultCreateSubscriptionRequestStrategy
public DefaultCreateSubscriptionRequestStrategy()
-
-
Method Details
-
createSubscriptionRequest
public CreateSubscriptionRequest createSubscriptionRequest(String siteName, String requestUrl, String responseUrl, String merchantCallbackUrl, CustomerModel customerModel, CreditCardPaymentInfoModel cardInfo, AddressModel paymentAddress) - Specified by:
createSubscriptionRequestin interfaceCreateSubscriptionRequestStrategy
-
setEmailAddress
-
getRequestOrderInfoData
-
getRequestSignatureData
-
getRequestSubscriptionSignatureData
protected SubscriptionSignatureData getRequestSubscriptionSignatureData(SubscriptionFrequencyEnum frequencyEnum) -
getHostedOrderPageAppearanceConfiguration
-
getOrderPageConfirmationData
protected OrderPageConfirmationData getOrderPageConfirmationData(String responseUrl, String merchantCallbackUrl) -
getHostedOrderPageVersion
-
setHostedOrderPageVersion
-
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
-
getSetupFeeAmount
Gets the CyberSource setup fee, currently populated by a config value.- Returns:
- the CyberSource setup fee amount
-
getMerchantId
Gets the CyberSource merchant ID.- Returns:
- the CyberSource merchant ID
-
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.
-
getCartService
-
setCartService
-
getCustomerBillToDataConverter
-
setCustomerBillToDataConverter
public void setCustomerBillToDataConverter(Converter<AddressModel, CustomerBillToData> customerBillToDataConverter) -
getCustomerShipToDataConverter
-
setCustomerShipToDataConverter
public void setCustomerShipToDataConverter(Converter<CartModel, CustomerShipToData> customerShipToDataConverter) -
getCustomerEmailResolutionService
-
setCustomerEmailResolutionService
public void setCustomerEmailResolutionService(CustomerEmailResolutionService customerEmailResolutionService) -
getPaymentInfoDataConverter
-
setPaymentInfoDataConverter
public void setPaymentInfoDataConverter(Converter<CreditCardPaymentInfoModel, PaymentInfoData> paymentInfoDataConverter) -
getSiteConfigService
-
setSiteConfigService
-