Skip to content

Commit

Permalink
Merge pull request #79 from pagopa/disable-ecommerce-filter
Browse files Browse the repository at this point in the history
bug: Disable ecommerce filter
  • Loading branch information
pasqualespica authored Sep 18, 2024
2 parents 577dcfa + 9ed8805 commit 34ed386
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ microservice-chart:
RECOVER_FAILED_MASSIVE_MAX_DAYS: "0"
RECOVER_NOT_NOTIFIED_MASSIVE_MAX_DAYS: "0"
RECOVER_NOT_NOTIFIED_MASSIVE_MAX_RECORDS: "200"
ECOMMERCE_FILTER_ENABLED: "true"
ECOMMERCE_FILTER_ENABLED: "false"
UNWANTED_REMITTANCE_INFO: "pagamento multibeneficiario,pagamento bpay"
envConfigMapExternals:
template-maps:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ microservice-chart:
RECOVER_FAILED_MASSIVE_MAX_DAYS: "1"
RECOVER_NOT_NOTIFIED_MASSIVE_MAX_DAYS: "1"
RECOVER_NOT_NOTIFIED_MASSIVE_MAX_RECORDS: "200"
ECOMMERCE_FILTER_ENABLED: "true"
ECOMMERCE_FILTER_ENABLED: "false"
UNWANTED_REMITTANCE_INFO: "pagamento multibeneficiario,pagamento bpay"
envConfigMapExternals:
template-maps:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ microservice-chart:
RECOVER_FAILED_MASSIVE_MAX_DAYS: "0"
RECOVER_NOT_NOTIFIED_MASSIVE_MAX_DAYS: "0"
RECOVER_NOT_NOTIFIED_MASSIVE_MAX_RECORDS: "200"
ECOMMERCE_FILTER_ENABLED: "true"
ECOMMERCE_FILTER_ENABLED: "false"
UNWANTED_REMITTANCE_INFO: "pagamento multibeneficiario,pagamento bpay"
envConfigMapExternals:
template-maps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,18 @@ public static List<CartItem> getCartItems(BizEvent bizEvent) {
public static boolean isBizEventInvalid(BizEvent bizEvent, ExecutionContext context, Logger logger) {

if (bizEvent == null) {
logger.debug("[{}] event is null", context.getFunctionName());
logger.error("[{}] event is null", context.getFunctionName());
return true;
}

if (!BizEventStatusType.DONE.equals(bizEvent.getEventStatus()) && !BizEventStatusType.INGESTED.equals(bizEvent.getEventStatus())) {
logger.debug("[{}] event with id {} discarded because in status {}",
logger.error("[{}] event with id {} discarded because in status {}",
context.getFunctionName(), bizEvent.getId(), bizEvent.getEventStatus());
return true;
}

if (!hasValidFiscalCode(bizEvent)) {
logger.debug("[{}] event with id {} discarded because debtor's and payer's identifiers are missing or not valid",
logger.error("[{}] event with id {} discarded because debtor's and payer's identifiers are missing or not valid",
context.getFunctionName(), bizEvent.getId());
return true;
}
Expand All @@ -249,13 +249,13 @@ public static boolean isBizEventInvalid(BizEvent bizEvent, ExecutionContext cont
&& bizEvent.getTransactionDetails().getInfo() != null
&& ECOMMERCE.equals(bizEvent.getTransactionDetails().getInfo().getClientId())
) {
logger.debug("[{}] event with id {} discarded because from e-commerce {}",
logger.error("[{}] event with id {} discarded because from e-commerce {}",
context.getFunctionName(), bizEvent.getId(), bizEvent.getTransactionDetails().getInfo().getClientId());
return true;
}

if (!isCartMod1(bizEvent)) {
logger.debug("[{}] event with id {} contain either an invalid amount value," +
logger.error("[{}] event with id {} contain either an invalid amount value," +
" or it is a legacy cart element",
context.getFunctionName(), bizEvent.getId());
return true;
Expand All @@ -280,7 +280,7 @@ public static boolean isBizEventInvalid(BizEvent bizEvent, ExecutionContext cont
}

if (intTotalNotice > 1) {
logger.debug("[{}] event with id {} discarded because is part of a payment cart ({} total notice)",
logger.error("[{}] event with id {} discarded because is part of a payment cart ({} total notice)",
context.getFunctionName(), bizEvent.getId(),
intTotalNotice);
return true;
Expand Down

0 comments on commit 34ed386

Please sign in to comment.