Skip to content

Commit

Permalink
[VAS-1167] feat: Updated method name for cartMod1 validation
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-cialini committed Jul 10, 2024
1 parent b81e00b commit 5896304
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public static boolean isBizEventInvalid(BizEvent bizEvent, ExecutionContext cont
return true;
}

if (!isCartOrHasValidAmount(bizEvent)) {
if (!isCartMod1(bizEvent)) {
logger.debug("[{}] event with id {} contain either an invalid amount value," +
" or it is a legacy cart element",
context.getFunctionName(), bizEvent.getId());
Expand Down Expand Up @@ -522,7 +522,7 @@ public static Integer getTotalNotice(BizEvent bizEvent, ExecutionContext context
return 1;
}

public static boolean isCartOrHasValidAmount(BizEvent bizEvent) {
public static boolean isCartMod1(BizEvent bizEvent) {
if (bizEvent.getPaymentInfo() != null && bizEvent.getPaymentInfo().getTotalNotice() == null) {
return bizEvent.getTransactionDetails() != null &&
new BigDecimal(bizEvent.getPaymentInfo().getAmount()).subtract(
Expand Down

0 comments on commit 5896304

Please sign in to comment.