FINERACT-1706-Allow-Chargeback-on-payment-type-transactions
This commit is contained in:
committed by
Adam Saghy
parent
5238e29449
commit
c7e777c37c
+4
@@ -567,6 +567,10 @@ public class LoanTransaction extends AbstractAuditableWithUTCDateTimeCustom {
|
||||
|| isChargeAdjustment();
|
||||
}
|
||||
|
||||
public boolean isTypeAllowedForChargeback() {
|
||||
return isRepayment() || isMerchantIssuedRefund() || isPayoutRefund() || isGoodwillCredit();
|
||||
}
|
||||
|
||||
public boolean isRepayment() {
|
||||
return LoanTransactionType.REPAYMENT.equals(getTypeOf()) && isNotReversed();
|
||||
}
|
||||
|
||||
+4
-4
@@ -1235,10 +1235,10 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
||||
transactionId);
|
||||
}
|
||||
|
||||
if (!loanTransaction.isRepaymentLikeType()) {
|
||||
throw new PlatformServiceUnavailableException("error.msg.loan.chargeback.operation.not.allowed",
|
||||
"Loan transaction:" + transactionId + " chargeback not allowed as loan transaction is not repayment type, its type is "
|
||||
+ loanTransaction.getTypeOf().getCode(),
|
||||
if (!loanTransaction.isTypeAllowedForChargeback()) {
|
||||
throw new PlatformServiceUnavailableException(
|
||||
"error.msg.loan.chargeback.operation.not.allowed", "Loan transaction:" + transactionId
|
||||
+ " chargeback not allowed for loan transaction type, its type is " + loanTransaction.getTypeOf().getCode(),
|
||||
transactionId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user