Class PaymentMethodsService
java.lang.Object
sk.iway.iwcm.components.basket.payment_methods.rest.PaymentMethodsService
Service for payment methods.
-
Constructor Summary
ConstructorsConstructorDescriptionPaymentMethodsService(List<BasePaymentMethod> basePaymentMethodsList, PaymentMethodRepository paymentMethodRepository) -
Method Summary
Modifier and TypeMethodDescriptionstatic intcreatePaymentInvoiceItemAndReturnId(BasketInvoiceEntity invoiceEntity, javax.servlet.http.HttpServletRequest request) From given invoice entity extract payment method and create invoice item of this payment method.voiddeletePaymentMethod(long id) getAllowedCoutriesMap(Prop prop) getAllPaymentMethods(Prop prop) static final List<LabelValue>getPaymentMethod(long id, Prop prop) static StringgetPaymentMethodLabel(String paymentMethod, javax.servlet.http.HttpServletRequest request) static final StringgetPaymentResponse(javax.servlet.http.HttpServletRequest request) static final PaymentStatehandlePayment(javax.servlet.http.HttpServletRequest request) static final booleanisPaymentMethodConfigured(String paymentMethod, Prop prop) booleanisPaymentMethodEditableByAdmin(BasketInvoicePaymentEntity paymentEntity) refundPayment(BigDecimal refundAmount, BasketInvoicePaymentEntity paymentEntity, javax.servlet.http.HttpServletRequest request) savePaymentMethod(PaymentMethodEntity paymentMethod, Prop prop) voidvalidateEditorValues(PaymentMethodEntity entity, org.springframework.validation.Errors errors, Prop prop)
-
Constructor Details
-
PaymentMethodsService
public PaymentMethodsService(List<BasePaymentMethod> basePaymentMethodsList, PaymentMethodRepository paymentMethodRepository)
-
-
Method Details
-
getAllPaymentMethods
-
getPaymentMethod
-
savePaymentMethod
-
deletePaymentMethod
public void deletePaymentMethod(long id) -
validateEditorValues
public void validateEditorValues(PaymentMethodEntity entity, org.springframework.validation.Errors errors, Prop prop) -
refundPayment
public RefundationState refundPayment(BigDecimal refundAmount, BasketInvoicePaymentEntity paymentEntity, javax.servlet.http.HttpServletRequest request) -
getConfiguredPaymentMethodsMap
-
getConfiguredPaymentMethodsLabels
-
isPaymentMethodConfigured
-
getPaymentResponse
-
handlePayment
-
createPaymentInvoiceItemAndReturnId
public static int createPaymentInvoiceItemAndReturnId(BasketInvoiceEntity invoiceEntity, javax.servlet.http.HttpServletRequest request) From given invoice entity extract payment method and create invoice item of this payment method.- Parameters:
invoiceEntity-request-- Returns:
- return id of new created invoice item (aka payment) or -1 if failed
-
getPaymentMethodLabel
-
getAllowedCoutriesMap
-
isPaymentMethodEditableByAdmin
-