public class DefaultCsCardPaymentService extends AbstractBusinessService implements CsCardPaymentService
CsCardPaymentService interface.AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCsCardPaymentService() |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplaceprotected TransactionCodeGenerator getTransactionCodeGenerator()
public void setTransactionCodeGenerator(TransactionCodeGenerator transactionCodeGenerator)
protected PaymentService getPaymentService()
public void setPaymentService(PaymentService paymentService)
protected TransactionInfoService getTransactionInfoService()
public void setTransactionInfoService(TransactionInfoService transactionInfoService)
protected CsOrderUnauthorizedTotalStrategy getCsOrderUnauthorizedTotalStrategy()
public void setCsOrderUnauthorizedTotalStrategy(CsOrderUnauthorizedTotalStrategy csOrderUnauthorizedTotalStrategy)
protected CardValidator getCardValidator()
public void setCardValidator(CardValidator cardValidator)
protected CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
public List<CreditCardType> getSupportedCardSchemes(AbstractOrderModel order)
CsCardPaymentServicegetSupportedCardSchemes in interface CsCardPaymentServiceorder - the cart or orderpublic List<CreditCardPaymentInfoModel> getPreviousCreditCardPaymentInfos(UserModel user)
CsCardPaymentServicegetPreviousCreditCardPaymentInfos in interface CsCardPaymentServiceuser - the userprotected String generatePaymentInfoKey(CreditCardPaymentInfoModel paymentInfo)
public PaymentTransactionEntryModel authoriseCardPayment(AbstractOrderModel order, CardInfo cardInfo, double amount) throws PaymentException, ValidationException
CsCardPaymentServiceauthoriseCardPayment in interface CsCardPaymentServiceorder - the cart or ordercardInfo - the payment card dataamount - the amount to authorisePaymentException - thrown on error from the payment serviceValidationException - thrown if the card details are invalidprotected String cleanupCardNumber(String cardNumber)
cardNumber - the inputted card numberpublic void validate(AbstractOrderModel order, CardInfo cardInfo, double amount) throws ValidationException
validateCardInfo(de.hybris.platform.core.model.order.AbstractOrderModel, de.hybris.platform.payment.dto.CardInfo, java.util.List)
,
validateBillingInfo(de.hybris.platform.core.model.order.AbstractOrderModel, de.hybris.platform.payment.dto.CardInfo, java.util.List)
, and validateAmount(de.hybris.platform.core.model.order.AbstractOrderModel, double, java.util.List).validate in interface CsCardPaymentServiceorder - the ordercardInfo - the cardInfoamount - the amountValidationException - thrown on error.protected void validateCardInfo(AbstractOrderModel order, CardInfo cardInfo, List<ResourceMessage> errorMessages)
order - The ordercardInfo - The cardInfoerrorMessages - list to append error messages toprotected void validateBillingInfo(AbstractOrderModel order, CardInfo cardInfo, List<ResourceMessage> errorMessages)
order - The ordercardInfo - The cardInfoerrorMessages - list to append error messages toprotected void validateAmount(AbstractOrderModel order, double amount, List<ResourceMessage> errorMessages)
CsOrderUnauthorizedTotalStrategy.order - The orderamount - The amounterrorMessages - list to append error messages toprotected String generatePreAuthTransactionCode(AbstractOrderModel order)
protected PaymentTransactionEntryModel preAuth(AbstractOrderModel order, CardInfo cardInfo, double amount) throws PaymentException
PaymentExceptionprotected AddressModel getPaymentDeliveryAddress(AbstractOrderModel order)
Copyright © 2017 SAP SE. All Rights Reserved.