Class PaymentManager
java.lang.Object
com.skava.oms.model.entity.manager.PaymentManager
This class handles event triggering to external services during order / item cancellation
- Since:
- 20-Aug-2018 This class contains the delegate for Cancel Order or Items
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimal
getAmounttochargeValueForNegativePayment
(BigDecimal amount, PaymentItem item, Payment payment) static BigDecimal
getAmounttochargeValueForPositivePayment
(BigDecimal amount, PaymentItem item, Payment payment) static List<PaymentItem>
getPaymentItems
(Order order, String paymentId, BigDecimal amount, PaymentStatus[] status) This method generates payment item to trigger events to payment servicestatic boolean
isEligbleStatus
(PaymentStatus[] lstStatus, PaymentStatus status)
-
Method Details
-
getPaymentItems
public static List<PaymentItem> getPaymentItems(Order order, String paymentId, BigDecimal amount, PaymentStatus[] status) This method generates payment item to trigger events to payment service- Parameters:
order
- - the order object to be used for get payment itempaymentId
- - paymentId to get payment itemamount
- - amount to get payment itemstatus
- - the status array to built for transaction- Returns:
- list of payment items
-
getAmounttochargeValueForPositivePayment
public static BigDecimal getAmounttochargeValueForPositivePayment(BigDecimal amount, PaymentItem item, Payment payment) - Parameters:
amount
- - amount to be processed.item
- - current payment item.payment
- - contains payment details.- Returns:
- BigDecimal calculated value.
-
getAmounttochargeValueForNegativePayment
public static BigDecimal getAmounttochargeValueForNegativePayment(BigDecimal amount, PaymentItem item, Payment payment) - Parameters:
amount
- - amount to be processed.item
- - current payment item.payment
- - contains payment details.- Returns:
- BigDecimal calculated value.
-
isEligbleStatus
- Parameters:
lstStatus
- - list of status are in end.status
- - current payment status- Returns:
- true if it is revert status
-