public class DefaultCsCheckoutService extends AbstractBusinessService implements CsCheckoutService
AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCsCheckoutService() |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplaceprotected OrderService getOrderService()
public void setOrderService(OrderService orderService)
protected KeyGenerator getOrderCodeGenerator()
public void setOrderCodeGenerator(KeyGenerator orderCodeGenerator)
protected CsOrderUnauthorizedTotalStrategy getCsOrderUnauthorizedTotalStrategy()
public void setCsOrderUnauthorizedTotalStrategy(CsOrderUnauthorizedTotalStrategy csOrderUnauthorizedTotalStrategy)
protected boolean isDeliveryAddressRequired()
public void setDeliveryAddressRequired(boolean deliveryAddressRequired)
protected boolean isDeliveryModeRequired()
public void setDeliveryModeRequired(boolean deliveryModeRequired)
protected boolean isPaymentAddressRequired()
public void setPaymentAddressRequired(boolean paymentAddressRequired)
protected OrderFulfillmentProcessService getOrderFulfillmentProcessService()
public void setOrderFulfillmentProcessService(OrderFulfillmentProcessService orderFulfillmentProcessService)
protected TransactionInfoService getTransactionInfoService()
public void setTransactionInfoService(TransactionInfoService transactionInfoService)
protected DeliveryService getDeliveryService()
public void setDeliveryService(DeliveryService deliveryService)
protected CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
protected CommerceCheckoutService getCommerceCheckoutService()
public void setCommerceCheckoutService(CommerceCheckoutService commerceCheckoutService)
protected CustomerAccountService getCustomerAccountService()
public void setCustomerAccountService(CustomerAccountService customerAccountService)
protected CsCardPaymentService getCsCardPaymentService()
public void setCsCardPaymentService(CsCardPaymentService csCardPaymentService)
public OrderModel doCheckout(CartModel cart) throws ValidationException
CsCheckoutServicedoCheckout in interface CsCheckoutServicecart - the cartValidationException - thrown if the order cannot be placedprotected void validateCartForCheckout(CartModel cart) throws ValidationException
ValidationExceptionpublic double getUnauthorizedTotal(CartModel cart)
CsCheckoutServicegetUnauthorizedTotal in interface CsCheckoutServicecart - the cartpublic java.util.List<PaymentTransactionModel> getValidPaymentTransactions(CartModel cart)
CsCheckoutServicegetValidPaymentTransactions in interface CsCheckoutServicecart - the cartpublic java.util.List<DeliveryModeModel> getAllDeliveryModes(CartModel cart)
CsCheckoutServicegetAllDeliveryModes in interface CsCheckoutServicecart - the cartpublic void canCreatePayments(CartModel cartModel) throws ValidationException
CsCheckoutServicecanCreatePayments in interface CsCheckoutServicecartModel - The cartValidationException - Exception thrown if payments cannot be created at this time. The exception includes messages that
detail the errors.public PaymentTransactionEntryModel authorisePayment(CartModel cart, CardInfo cardInfo, double amount) throws PaymentException, ValidationException
CsCheckoutServiceauthorisePayment in interface CsCheckoutServicecart - the cartcardInfo - the payment card dataamount - the amount to authorisePaymentException - thrown on error from the payment serviceValidationException - thrown if the card details are invalidpublic PaymentTransactionEntryModel authorisePayment(CartModel cart, CreditCardPaymentInfoModel storeCard, java.math.BigDecimal amount, java.lang.String cv2) throws PaymentException, ValidationException
CsCheckoutServiceauthorisePayment in interface CsCheckoutServicecart - the cartstoreCard - the stored cardamount - the amount to authorisecv2 - the cv2 numberPaymentException - thrown on error from the payment serviceValidationException - thrown if the card details are invalidprotected AddressModel getPaymentDeliveryAddress(CartModel cart)
protected void validateCartForCreatePayments(CartModel cart) throws ValidationException
ValidationExceptionprotected CreditCardPaymentInfoModel createSubscription(CartModel cart, CardInfo cardInfo) throws PaymentException
PaymentExceptionprotected PaymentTransactionEntryModel preAuth(CartModel cart, CreditCardPaymentInfoModel creditCardPaymentInfoModel, java.math.BigDecimal amountToAuth, java.lang.String cv2Number) throws PaymentException
PaymentExceptionprotected java.lang.String cleanupCardNumber(java.lang.String cardNumber)
cardNumber - the inputted card numberprotected java.lang.String getPaymentProvider()
Copyright © 2018 SAP SE. All Rights Reserved.