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

Fix #287 #288

Merged
merged 13 commits into from
Oct 10, 2024
Merged

Fix #287 #288

merged 13 commits into from
Oct 10, 2024

Conversation

jerebtw
Copy link
Owner

@jerebtw jerebtw commented Sep 24, 2024

No description provided.

Copy link
Contributor

@dreinon dreinon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these suggestios might be needed in order to work. Review them and let me know, please.

Thanks for your work @jerebtw!

src/index.ts Outdated
@@ -220,7 +222,8 @@ function getPmtInf(
);
}

if (options?.checkBIC && !isValidBIC(item.bic)) {
const bicOptional = PAIN_TYPES[painFormat] === "CstmrCdtTrfInitn";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const bicOptional = PAIN_TYPES[painFormat] === "CstmrCdtTrfInitn";
const bicOptional = PAIN_TYPES[painFormat] === "CstmrDrctDbtInitn";

Copy link
Owner Author

@jerebtw jerebtw Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct, because then pain.001.001.03 and pain.001.003.03 will support optional bic and not pain.008.001.02 and pain.008.003.02

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jerebtw, pain.001... are for credit transfers, and pain.008 are for direct debit, which is where bic is optional. That's why I think that the bic optional variable shouod be true if pain type is CstmrDrctDbtInitn (which are pain.008...) and not CstmrCdtTrfInitn (which are pain.001...)

Copy link
Contributor

@dreinon dreinon Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it even easier, I think credit transfers also allow bic optional, as this article says

Since February 2016, the ‘IBAN only’ rule has been in force, and makes SEPA payments even easier for consumers and corporates. When they make euro credit transfers or direct debits in SEPA, they are no longer asked to provide the BIC of the payer or payee because the IBAN is sufficient to process the transaction. PSPs can consult databases provided by various suppliers in order to link the IBAN to the BIC.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks okay, I will change that and release a new version.

src/index.ts Outdated Show resolved Hide resolved
@jerebtw jerebtw merged commit 6251f34 into main Oct 10, 2024
1 check passed
@jerebtw jerebtw deleted the #287 branch October 10, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants