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

[PRDP-225] feat: updated generated flag policy #82

Merged
merged 1 commit into from
Nov 23, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,7 @@ private String getOrThrow(LinkedHashMap<String, String> map, String key, String
}

public boolean getProcessedByPagoPA(BizEvent event) {
if (event.getTransactionDetails() != null && event.getTransactionDetails().getWallet() != null) {
String onboardingChannel = event.getTransactionDetails().getWallet().getOnboardingChannel();
return onboardingChannel != null &&
(onboardingChannel.equals(PAGO_PA_CHANNEL_IO) ||
onboardingChannel.equals(PAGO_PA_CHANNEL_IO_PAY)
);
}

return false;
return event.getIdPaymentManager() != null && !event.getIdPaymentManager().isBlank();
}

private String currencyFormat(String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ void setUp() throws Exception {
void mapTemplateAllFieldsSuccessCompleteTemplateAndIOChannel() throws Exception {
BizEvent event = BizEvent.builder()
.id(BIZ_EVENT_ID)
.idPaymentManager(BIZ_EVENT_ID)
.debtorPosition(DebtorPosition.builder()
.iuv(IUV)
.modelType(MODEL_TYPE_IUV_CODE)
Expand Down Expand Up @@ -169,6 +170,7 @@ void mapTemplateAllFieldsSuccessCompleteTemplateAndIOChannel() throws Exception
void mapTemplateAllFieldsSuccessCompleteTemplateAndIOPAYChannel() throws Exception {
BizEvent event = BizEvent.builder()
.id(BIZ_EVENT_ID)
.idPaymentManager(BIZ_EVENT_ID)
.debtorPosition(DebtorPosition.builder()
.iuv(IUV)
.modelType(MODEL_TYPE_IUV_CODE)
Expand Down Expand Up @@ -490,6 +492,7 @@ void mapTemplateWithoutTransactionDetailsAndPaymentTokenSuccess() throws Excepti
void mapTemplateAllFieldsSuccessDebtorFullNameEmpty() throws Exception {
BizEvent event = BizEvent.builder()
.id(BIZ_EVENT_ID)
.idPaymentManager(BIZ_EVENT_ID)
.debtorPosition(DebtorPosition.builder()
.iuv(IUV)
.modelType(MODEL_TYPE_IUV_CODE)
Expand Down Expand Up @@ -526,7 +529,7 @@ void mapTemplateAllFieldsSuccessDebtorFullNameEmpty() throws Exception {
.amount(AMOUNT_LONG)
.fee(FEE_LONG)
.rrn(RRN)
.authorizationCode(AUTH_CODE)
.numAut(AUTH_CODE)
.creationDate(DATE_TIME_TIMESTAMP_ZONED)
.psp(TransactionPsp.builder()
.businessName(PSP_NAME)
Expand Down Expand Up @@ -580,6 +583,7 @@ void mapTemplateAllFieldsSuccessDebtorFullNameEmpty() throws Exception {
void mapTemplateAllFieldsSuccessDebtorFullNameWithSpecialChar() throws Exception {
BizEvent event = BizEvent.builder()
.id(BIZ_EVENT_ID)
.idPaymentManager(BIZ_EVENT_ID)
.debtorPosition(DebtorPosition.builder()
.iuv(IUV)
.modelType(MODEL_TYPE_IUV_CODE)
Expand Down Expand Up @@ -616,7 +620,7 @@ void mapTemplateAllFieldsSuccessDebtorFullNameWithSpecialChar() throws Exception
.amount(AMOUNT_LONG)
.fee(FEE_LONG)
.rrn(RRN)
.authorizationCode(AUTH_CODE)
.numAut(AUTH_CODE)
.creationDate(DATE_TIME_TIMESTAMP_ZONED)
.psp(TransactionPsp.builder()
.businessName(PSP_NAME)
Expand Down Expand Up @@ -670,6 +674,7 @@ void mapTemplateAllFieldsSuccessDebtorFullNameWithSpecialChar() throws Exception
void mapTemplateAllFieldsSuccessDebtorFullNameEqualsFiscalCode() throws Exception {
BizEvent event = BizEvent.builder()
.id(BIZ_EVENT_ID)
.idPaymentManager(BIZ_EVENT_ID)
.debtorPosition(DebtorPosition.builder()
.iuv(IUV)
.modelType(MODEL_TYPE_IUV_CODE)
Expand Down Expand Up @@ -706,7 +711,7 @@ void mapTemplateAllFieldsSuccessDebtorFullNameEqualsFiscalCode() throws Exceptio
.amount(AMOUNT_LONG)
.fee(FEE_LONG)
.rrn(RRN)
.authorizationCode(AUTH_CODE)
.numAut(AUTH_CODE)
.creationDate(DATE_TIME_TIMESTAMP_ZONED)
.psp(TransactionPsp.builder()
.businessName(PSP_NAME)
Expand Down
Loading