Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Disable ecommerce filter #79

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading