Project60 / org.project60.sepa

SEPA direct debit integration with civicrm
19 stars 46 forks source link

CBI File Format (was: Validation error on import XML to my bank) #601

Closed masetto closed 2 years ago

masetto commented 3 years ago

Hi, I state that this is the first time I create XML file from this module. 😄

XML file starts with this rows:

<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02 pain.008.001.02.xsd">
  <CstmrDrctDbtInitn>
    <GrpHdr>

When I import to my internet banking (Italian bank) I have this error: 2020-10-09_17h18_23

File pain.008.001.02.xsd does not exist.

Is this a problem of my bank or another one? Thanks

bjendres commented 3 years ago

@masetto You can either

  1. talk to your bank and ask which SEPA PAIN flavours they accept, or
  2. try all the formats that CiviSEPA is shipped with, and see if any gets accepted.
masetto commented 3 years ago

Hi @bjendres, this is the answer of my bank:

streams starting with the <Document tag are NOT accepted by the system, they must be CBI -> CBIBdySDDReq compliant In this case it is NOT enough to modify the start tag, the flow must be created respecting the CBI rules.

What is this standard? Is it different from the ones you have implemented? Thanks

bjendres commented 3 years ago

Yes, that seems to be a custom (non-PAIN) file format. I'm not aware of anyone having implemented these CBI file formats for CiviSEPA.

The process of doing this would probably be something like:

  1. check if the data and the workflows in CiviSEPA can be mapped to that file format. If so:
  2. create a new file format (see e.g. HERE and HERE)
  3. create a PR to add the new file format to CiviSEPA. Alternatively, this could be part of an extension, see e.g. HERE
masetto commented 3 years ago

Hi @bjendres thank you for your indications. This is an example XML CBI file accepted by my italian bank. Is it a format you have already heard of? I think it is a standard in Italy. Do you think it is useful to develop it in this CiviSEPA extension?

bjendres commented 3 years ago

Is it a format you have already heard of? I think it is a standard in Italy.

No, never come across it, sorry.

Do you think it is useful to develop it in this CiviSEPA extension?

If it's an Italian standard, probably. Would you want to do it yourself, or would you want to hire us to do it?

masetto commented 3 years ago

I'll try it by myself, thanks.

bjendres commented 2 years ago

@masetto Did you ever manage to create this file format in CiviSEPA? If so, could you create a PR with this? Other people might want to use that, too...

masetto commented 2 years ago

:+1: @bjendres, I will continue this shortly

masetto commented 2 years ago

@bjendres can you give me some instructions for transferring sepa mandates to CiviCRM. What are the steps to be taken? Thank you

bjendres commented 2 years ago

You can use the APIv3 using the SepaMandate.createfull action.

Alternatively, you could use a formprocessor, CiviSEPA offers a couple of actions around SEPA mandates.

(Sorry for the late reply. )