Class PaymentMethodsService

java.lang.Object
sk.iway.iwcm.components.basket.payment_methods.rest.PaymentMethodsService

@Service public class PaymentMethodsService extends Object
Service for payment methods.
  • Constructor Details

  • Method Details

    • getAllPaymentMethods

      public List<PaymentMethodEntity> getAllPaymentMethods(Prop prop)
    • getPaymentMethod

      public PaymentMethodEntity getPaymentMethod(long id, Prop prop)
    • savePaymentMethod

      public PaymentMethodEntity savePaymentMethod(PaymentMethodEntity paymentMethod, Prop prop)
    • 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

      public static final Map<String,String> getConfiguredPaymentMethodsMap(Prop prop)
    • getConfiguredPaymentMethodsLabels

      public static final List<LabelValue> getConfiguredPaymentMethodsLabels(Prop prop)
    • isPaymentMethodConfigured

      public static final boolean isPaymentMethodConfigured(String paymentMethod, Prop prop)
    • getPaymentResponse

      public static final String getPaymentResponse(javax.servlet.http.HttpServletRequest request)
    • handlePayment

      public static final PaymentState handlePayment(javax.servlet.http.HttpServletRequest request)
    • 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

      public static String getPaymentMethosLabel(String paymentMethod, javax.servlet.http.HttpServletRequest request)
    • getAllowedCoutriesMap

      public static final Map<String,String> getAllowedCoutriesMap(Prop prop)
    • isPaymentMethodEditableByAdmin

      public boolean isPaymentMethodEditableByAdmin(BasketInvoicePaymentEntity paymentEntity)