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 int
createPaymentInvoiceItemAndReturnId
(BasketInvoiceEntity invoiceEntity, javax.servlet.http.HttpServletRequest request) From given invoice entity extract payment method and create invoice item of this payment method.void
deletePaymentMethod
(long id) getAllowedCoutriesMap
(Prop prop) getAllPaymentMethods
(Prop prop) static final List<LabelValue>
getPaymentMethod
(long id, Prop prop) static String
getPaymentMethosLabel
(String paymentMethod, javax.servlet.http.HttpServletRequest request) static final String
getPaymentResponse
(javax.servlet.http.HttpServletRequest request) static final PaymentState
handlePayment
(javax.servlet.http.HttpServletRequest request) static final boolean
isPaymentMethodConfigured
(String paymentMethod, Prop prop) boolean
isPaymentMethodEditableByAdmin
(BasketInvoicePaymentEntity paymentEntity) refundPayment
(BigDecimal refundAmount, BasketInvoicePaymentEntity paymentEntity, javax.servlet.http.HttpServletRequest request) savePaymentMethod
(PaymentMethodEntity paymentMethod, Prop prop) void
validateEditorValues
(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
-
getPaymentMethosLabel
-
getAllowedCoutriesMap
-
isPaymentMethodEditableByAdmin
-