Skip to content

Instantly share code, notes, and snippets.

@GeorgeAnt
Last active June 21, 2022 14:25
Show Gist options
  • Save GeorgeAnt/8ee113ca7528af0017b7cdfdf9204b4e to your computer and use it in GitHub Desktop.
Save GeorgeAnt/8ee113ca7528af0017b7cdfdf9204b4e to your computer and use it in GitHub Desktop.
P27MessageActions
import gr.datamation.sepa.core.messages.common.MsgReplyInfo;
import gr.datamation.sepa.core.messages.common.ReasonCode;
import gr.datamation.sepa.core.messages.p27.AppHdrDocument;
import gr.datamation.sepa.core.messages.p27.FileP27;
import gr.datamation.sepa.core.messages.p27.camt.ClaimNonReceipt;
import gr.datamation.sepa.core.messages.p27.camt.FIToFIPaymentCancellationRequest;
import gr.datamation.sepa.core.messages.p27.camt.RequestToModifyPayment;
import gr.datamation.sepa.core.messages.p27.head.BusinessApplicationHeader;
import gr.datamation.sepa.core.messages.p27.pacs.FIToFICustomerCreditTransfer;
import gr.datamation.sepa.core.messages.p27.pacs.PaymentReturn;
import gr.datamation.sepa.types.p27.file.app.hdr.FileApplicationHeaderV01;
import gr.datamation.sepa.types.p27.head001.OrigMsgName;
import gr.datamation.sepa.types.p27.pacs008.ActiveCurrencyAndAmountB27;
import gr.datamation.sepa.types.p27.pacs008.ActiveCurrencyAndAmountB272;
import gr.datamation.sepa.types.p27.pacs008.ActiveCurrencyCode;
import java.math.BigDecimal;
import java.time.ZoneOffset;
import java.util.*;
public class P27MessageActions {
public static void main(String... args) throws Exception {
execute();
}
public static void execute() throws Exception {
buildMessage();
parseAndValidateMessage();
autoReplyPacs004();
autoReplyCamt056();
autoReplyCamt027();
autoReplyCamt087();
autoReplyCamt029V03();
autoReplyCamt029V08();
}
private static FIToFICustomerCreditTransfer buildMessage() {
//In P27, all messages are wrapped by a File wrapper
//The structure of a message in P27 follows:
//The root element of the file is a 'Document' and the first child is a 'FileAppHdr'.
//Then, a repeatable sequence of AppHdr and Message follows.
//- Document
//--- FileAppHdr
//<---
//--- AppHdr
//--- CreditTransfer(pacs.008.001.02) or MessageStatusReport(pacs.002.001.03) or Return(pacs.004.001.02)
// or Recall(camt.056.001.01) or ResponseRecall(camt.029.001.03) or ClaimNonReceipt(camt.027.001.06)
// or ValueCorrection(camt.087.001.05) or ResponseInquiry(camt.029.001.08) or SystemNotificationEvent(admi.004.001.02)
//--->
//You have to initiate the message object using the FileP27 constructor.
FileP27 pacs008FileWrapper = new FileP27();
try {
//We create the FileAppHdr
FileApplicationHeaderV01 fileAppHdr = new FileApplicationHeaderV01();
fileAppHdr.setNbOfBtchs("1");
pacs008FileWrapper.getRootMessage().setFileAppHdr(fileAppHdr);
//We create the AppHdr
BusinessApplicationHeader appHdr = new BusinessApplicationHeader();
appHdr.setElement("/Fr/FIId/FinInstnId/BICFI", "TESTBICA");
appHdr.setElement("/To/FIId/FinInstnId/BICFI", "TESTBICB");
appHdr.setElement("/BizMsgIdr", "20220516091628");
appHdr.setElement("/MsgDefIdr", OrigMsgName.PACS_008_001_02.value());
appHdr.getRootMessage().setCreDt(Utils.xmlGregorianCalendar(TimeZone.getTimeZone(ZoneOffset.UTC)));
//In order to parse and validate a pacs.008 you need to use FIToFICustomerCreditTransfer
//FIToFICustomerCreditTransfer > matches the xml element <FIToFICstmrCdtTrf>
FIToFICustomerCreditTransfer pacs008 = new FIToFICustomerCreditTransfer();
pacs008.setElement("/GrpHdr/MsgId", "20220516091628");
pacs008.setElement("/GrpHdr/CreDtTm", Calendar.getInstance());
pacs008.setElement("/GrpHdr/NbOfTxs", "1");
ActiveCurrencyAndAmountB27 amount = new ActiveCurrencyAndAmountB27();
amount.setCcy(ActiveCurrencyCode.SEK);
amount.setValue(new BigDecimal("1000.00"));
pacs008.setElement("/GrpHdr/IntrBkSttlmDt", Calendar.getInstance());
pacs008.setElement("/GrpHdr/TtlIntrBkSttlmAmt", amount);
pacs008.setElement("/GrpHdr/SttlmInf/SttlmMtd", "CLRG");
pacs008.setElement("/GrpHdr/SttlmInf/ClrSys/Cd", "B27");
pacs008.setElement("/GrpHdr/InstgAgt/FinInstnId/BIC", "TESTBICA");
pacs008.setElement("/GrpHdr/InstgAgt/FinInstnId/BIC", "TESTBICB");
pacs008.setElement("/CdtTrfTxInf/PmtId/InstrId", "20220516091628");
pacs008.setElement("/CdtTrfTxInf/PmtId/EndToEndId", "20220516091628");
pacs008.setElement("/CdtTrfTxInf/PmtId/TxId", "20220516091628");
pacs008.setElement("/CdtTrfTxInf/PmtTpInf/SvcLvl/Cd", "NPCA");
pacs008.setElement("/CdtTrfTxInf/PmtTpInf/LclInstrm/Cd", "PERI");
ActiveCurrencyAndAmountB272 amount2 = new ActiveCurrencyAndAmountB272();
amount2.setCcy(ActiveCurrencyCode.SEK);
amount2.setValue(new BigDecimal("1000.00"));
pacs008.setElement("/CdtTrfTxInf/IntrBkSttlmAmt", amount2);
pacs008.setElement("/CdtTrfTxInf/ChrgBr", "SLEV");
pacs008.setElement("/CdtTrfTxInf/Dbtr/Nm", "JOHN DOE");
pacs008.setElement("/CdtTrfTxInf/Dbtr/PstlAdr/AdrLine", "ADDRESS 1");
pacs008.setElement("/CdtTrfTxInf/DbtrAcct/Id/IBAN", "DK5000400440116243");
pacs008.setElement("/CdtTrfTxInf/DbtrAgt/FinInstnId/BIC", "TESTBICA");
pacs008.setElement("/CdtTrfTxInf/CdtrAgt/FinInstnId/BIC", "TESTBICB");
pacs008.setElement("/CdtTrfTxInf/Cdtr/Nm", "Jane Doe");
pacs008.setElement("/CdtTrfTxInf/Cdtr/PstlAdr/AdrLine", "Address 2");
pacs008.setElement("/CdtTrfTxInf/CdtrAcct/Id/IBAN", "SE4550000000058398257466");
pacs008.setElement("/CdtTrfTxInf/RmtInf/Ustrd", "Unstructured Remit Info");
//We add the AppHdr and the pacs008 in File Wrapper
pacs008FileWrapper.addPacs008(new AppHdrDocument<>(appHdr, pacs008));
pacs008FileWrapper.validate();
Utils.printValidMessageOrErrors(pacs008FileWrapper);
} catch (Exception e) {
e.printStackTrace();
System.err.println("Message cannot be generated");
}
return null;
}
private static FIToFICustomerCreditTransfer parseAndValidateMessage() {
//In P27, all messages are wrapped by a File wrapper
//The structure of a message in P27 follows:
//The root element of the file is a 'Document' and the first child is a 'FileAppHdr'.
//Then, a repeatable sequence of AppHdr and Message follows.
//- Document
//--- FileAppHdr
//<---
//--- AppHdr
//--- CreditTransfer(pacs.008.001.02) or MessageStatusReport(pacs.002.001.03) or Return(pacs.004.001.02)
// or Recall(camt.056.001.01) or ResponseRecall(camt.029.001.03) or ClaimNonReceipt(camt.027.001.06)
// or ValueCorrection(camt.087.001.05) or ResponseInquiry(camt.029.001.08) or SystemNotificationEvent(admi.004.001.02)
//--->
//You have to initiate the message object using the FileP27 constructor.
FileP27 messageObject = new FileP27();
try {
//Use parseAndValidateString() to fill the messageObject the content of the message and validate it
//validation fills the message variable errors object with any issue found during validation
messageObject.parseAndValidateString(validPacs008String);
Utils.printValidMessageOrErrors(messageObject);
//For each message type you want to get, you should retrieve the relevant list.
//You have the following options:
//- getAdmi004List()
//- getCamt027List()
//- getCamt029v03List()
//- getCamt029v08List()
//- getCamt056List()
//- getCamt087List()
//- getPacs002List()
//- getPacs004List()
//- getPacs008List()
//Each of these lists returns a list of 'AppHdrDocument' where an 'AppHdrDocument' consists of BusinessApplicationHeader and the message
return messageObject.getPacs008List().get(0).getDocument();
} catch (Exception e) {
e.printStackTrace();
System.err.println("Message cannot be parsed");
}
return null;
}
private static void autoReplyPacs004() throws Exception {
FIToFICustomerCreditTransfer messageObject = parseAndValidateMessage();
//You have to initiate the class for the return
PaymentReturn replyMessage = new PaymentReturn();
//You have to initiate MsgReplyInfo which contains information for the return
MsgReplyInfo msgReplyInfo = new MsgReplyInfo("20220516091628", new ReasonCode(ReasonCode.CD, "FOCR"),
MsgReplyInfo.MSGID_BASED, "1234", null, null);
//Reply message is filled with information of the original message and MsgReplyInfo
messageObject.autoReply(replyMessage, Collections.singletonList(msgReplyInfo));
//Fill extra elements, required for the reply message
replyMessage.setElement("/GrpHdr/MsgId", "1234");
replyMessage.setElement("/GrpHdr/IntrBkSttlmDt", Calendar.getInstance());
replyMessage.setElement("/GrpHdr/SttlmInf/SttlmMtd", "CLRG");
//We need to add the pacs004 inside a file wrapper in order for validate to work properly
FileP27 pacs004FileWrapper = new FileP27();
//We create the FileAppHdr
FileApplicationHeaderV01 fileAppHdr = new FileApplicationHeaderV01();
fileAppHdr.setNbOfBtchs("1");
pacs004FileWrapper.getRootMessage().setFileAppHdr(fileAppHdr);
//We create the AppHdr
BusinessApplicationHeader appHdr = new BusinessApplicationHeader();
appHdr.setElement("/Fr/FIId/FinInstnId/BICFI", "TESTBICB");
appHdr.setElement("/To/FIId/FinInstnId/BICFI", "TESTBICA");
appHdr.setElement("/BizMsgIdr", "1234");
appHdr.setElement("/MsgDefIdr", OrigMsgName.PACS_004_001_02.value());
appHdr.getRootMessage().setCreDt(Utils.xmlGregorianCalendar(TimeZone.getTimeZone(ZoneOffset.UTC)));
//We add the AppHdr and the pacs004 in File Wrapper
pacs004FileWrapper.addPacs004(new AppHdrDocument<>(appHdr, replyMessage));
pacs004FileWrapper.validate();
Utils.printValidMessageOrErrors(pacs004FileWrapper);
}
private static void autoReplyCamt056() throws Exception {
FIToFICustomerCreditTransfer messageObject = parseAndValidateMessage();
//You have to initiate the class for the cancellation request
FIToFIPaymentCancellationRequest replyMessage = new FIToFIPaymentCancellationRequest();
//You have to initiate MsgReplyInfo which contains information for the cancellation request
MsgReplyInfo msgReplyInfo = new MsgReplyInfo("20220516091628", new ReasonCode(ReasonCode.CD, "CUST"),
MsgReplyInfo.MSGID_BASED, "1234", null, new Date());
//Reply message is filled with information of the original message and MsgReplyInfo
messageObject.autoReply(replyMessage, Collections.singletonList(msgReplyInfo));
//Fill extra elements, required for the reply message
replyMessage.setElement("/Assgnmt/Id", "1234");
replyMessage.setElement("/Assgnmt/Assgnr/Agt/FinInstnId/BIC", "TESTBICA");
replyMessage.setElement("/Assgnmt/Assgne/Agt/FinInstnId/BIC", "TESTBICB");
replyMessage.setElement("/Assgnmt/CreDtTm", Calendar.getInstance());
//We need to add the camt056 inside a file wrapper in order for validate to work properly
FileP27 camt056FileWrapper = new FileP27();
//We create the FileAppHdr
FileApplicationHeaderV01 fileAppHdr = new FileApplicationHeaderV01();
fileAppHdr.setNbOfBtchs("1");
camt056FileWrapper.getRootMessage().setFileAppHdr(fileAppHdr);
//We create the AppHdr
BusinessApplicationHeader appHdr = new BusinessApplicationHeader();
appHdr.setElement("/Fr/FIId/FinInstnId/BICFI", "TESTBICA");
appHdr.setElement("/To/FIId/FinInstnId/BICFI", "TESTBICB");
appHdr.setElement("/BizMsgIdr", "1234");
appHdr.setElement("/MsgDefIdr", OrigMsgName.CAMT_056_001_01.value());
appHdr.getRootMessage().setCreDt(Utils.xmlGregorianCalendar(TimeZone.getTimeZone(ZoneOffset.UTC)));
//We add the AppHdr and the camt056 in File Wrapper
camt056FileWrapper.addCamt056(new AppHdrDocument<>(appHdr, replyMessage));
camt056FileWrapper.validate();
Utils.printValidMessageOrErrors(camt056FileWrapper);
}
private static void autoReplyCamt027() throws Exception {
FIToFICustomerCreditTransfer messageObject = parseAndValidateMessage();
//You have to initiate the class for the claim non receipt
ClaimNonReceipt replyMessage = new ClaimNonReceipt();
//You have to initiate MsgReplyInfo which contains information for the cancellation request
MsgReplyInfo msgReplyInfo = new MsgReplyInfo("20220516091628", null,
MsgReplyInfo.MSGID_BASED, null, null, null);
//Reply message is filled with information of the original message and MsgReplyInfo
messageObject.autoReply(replyMessage, Collections.singletonList(msgReplyInfo));
//Fill extra elements, required for the reply message
replyMessage.setElement("/Assgnmt/Id", "1234");
replyMessage.setElement("/Assgnmt/CreDtTm", Calendar.getInstance());
replyMessage.setElement("/Case/Id", "1234");
//We need to add the camt027 inside a file wrapper in order for validate to work properly
FileP27 camt027FileWrapper = new FileP27();
//We create the FileAppHdr
FileApplicationHeaderV01 fileAppHdr = new FileApplicationHeaderV01();
fileAppHdr.setNbOfBtchs("1");
camt027FileWrapper.getRootMessage().setFileAppHdr(fileAppHdr);
//We create the AppHdr
BusinessApplicationHeader appHdr = new BusinessApplicationHeader();
appHdr.setElement("/Fr/FIId/FinInstnId/BICFI", "TESTBICB");
appHdr.setElement("/To/FIId/FinInstnId/BICFI", "TESTBICA");
appHdr.setElement("/BizMsgIdr", "1234");
appHdr.setElement("/MsgDefIdr", OrigMsgName.CAMT_027_001_06.value());
appHdr.getRootMessage().setCreDt(Utils.xmlGregorianCalendar(TimeZone.getTimeZone(ZoneOffset.UTC)));
//We add the AppHdr and the camt027 in File Wrapper
camt027FileWrapper.addCamt027(new AppHdrDocument<>(appHdr, replyMessage));
camt027FileWrapper.validate();
Utils.printValidMessageOrErrors(camt027FileWrapper);
}
private static void autoReplyCamt087() throws Exception {
FIToFICustomerCreditTransfer messageObject = parseAndValidateMessage();
//You have to initiate the class for the request to modify payment
RequestToModifyPayment replyMessage = new RequestToModifyPayment();
//You have to initiate MsgReplyInfo which contains information for the cancellation request
MsgReplyInfo msgReplyInfo = new MsgReplyInfo("20220516091628", null,
MsgReplyInfo.MSGID_BASED, null, null, new Date());
//Reply message is filled with information of the original message and MsgReplyInfo
messageObject.autoReply(replyMessage, Collections.singletonList(msgReplyInfo));
//Fill extra elements, required for the reply message
replyMessage.setElement("/Assgnmt/Id", "1234");
replyMessage.setElement("/Assgnmt/CreDtTm", Calendar.getInstance());
replyMessage.setElement("/Case/Id", "1234");
//We need to add the camt087 inside a file wrapper in order for validate to work properly
FileP27 camt087FileWrapper = new FileP27();
//We create the FileAppHdr
FileApplicationHeaderV01 fileAppHdr = new FileApplicationHeaderV01();
fileAppHdr.setNbOfBtchs("1");
camt087FileWrapper.getRootMessage().setFileAppHdr(fileAppHdr);
//We create the AppHdr
BusinessApplicationHeader appHdr = new BusinessApplicationHeader();
appHdr.setElement("/Fr/FIId/FinInstnId/BICFI", "TESTBICB");
appHdr.setElement("/To/FIId/FinInstnId/BICFI", "TESTBICA");
appHdr.setElement("/BizMsgIdr", "1234");
appHdr.setElement("/MsgDefIdr", OrigMsgName.CAMT_027_001_06.value());
appHdr.getRootMessage().setCreDt(Utils.xmlGregorianCalendar(TimeZone.getTimeZone(ZoneOffset.UTC)));
//We add the AppHdr and the camt087 in File Wrapper
camt087FileWrapper.addCamt087(new AppHdrDocument<>(appHdr, replyMessage));
camt087FileWrapper.validate();
Utils.printValidMessageOrErrors(camt087FileWrapper);
}
private static void autoReplyCamt029V03() throws Exception {
FIToFICustomerCreditTransfer messageObject = parseAndValidateMessage();
//You have to initiate the class for the resolution of investigation
ResolutionOfInvestigation replyMessage = new ResolutionOfInvestigation();
//You have to initiate MsgReplyInfo which contains information for the resolution of investigation
MsgReplyInfo msgReplyInfo = new MsgReplyInfo();
msgReplyInfo.setRtrid("RTRDE0920000891");
msgReplyInfo.setRCode(new ReasonCode(ReasonCode.CD, "ACNR"));
//Reply message is filled with information of the original message and MsgReplyInfo
messageObject.autoReply(replyMessage, Collections.singletonList(msgReplyInfo));
//Fill extra elements, required for the reply message
replyMessage.setElement("/Assgnmt/Id", "TESTBICA");
replyMessage.setElement("/Assgnmt/Assgnr/Agt/FinInstnId/BIC", "TESTBICA");
replyMessage.setElement("/Assgnmt/Assgne/Agt/FinInstnId/BIC", "TESTBICA");
replyMessage.setElement("/Assgnmt/CreDtTm", Calendar.getInstance());
//We need to add the camt029V03 inside a file wrapper in order for validate to work properly
FileP27 camt029v03FileWrapper = new FileP27();
//We create the FileAppHdr
FileApplicationHeaderV01 fileAppHdr = new FileApplicationHeaderV01();
fileAppHdr.setNbOfBtchs("1");
camt029v03FileWrapper.getRootMessage().setFileAppHdr(fileAppHdr);
//We create the AppHdr
BusinessApplicationHeader appHdr = new BusinessApplicationHeader();
appHdr.setElement("/Fr/FIId/FinInstnId/BICFI", "UUUUGB2L");
appHdr.setElement("/To/FIId/FinInstnId/BICFI", "UUUUGB2L");
appHdr.setElement("/BizMsgIdr", "string");
appHdr.setElement("/MsgDefIdr", OrigMsgName.CAMT_029_001_03.value());
appHdr.getRootMessage().setCreDt(DatatypeFactory.newInstance()
.newXMLGregorianCalendar((GregorianCalendar) GregorianCalendar.getInstance(TimeZone.getTimeZone(ZoneOffset.UTC))));
//We add the AppHdr and the camt029V03 in File Wrapper
camt029v03FileWrapper.addCamt029v03(new AppHdrDocument<>(appHdr, replyMessage));
camt029v03FileWrapper.validate();
Utils.printValidMessageOrErrors(camt029v03FileWrapper);
}
private static void autoReplyCamt029V08() throws Exception {
FIToFICustomerCreditTransfer messageObject = parseAndValidateMessage();
//You have to initiate the class for the resolution of investigation
ResolutionOfInvestigation08 replyMessage = new ResolutionOfInvestigation08();
//You have to initiate MsgReplyInfo which contains information for the resolution of investigation
MsgReplyInfo msgReplyInfo = new MsgReplyInfo();
msgReplyInfo.setRtrid("RTRDE0920000891");
msgReplyInfo.setRCode(new ReasonCode(ReasonCode.CD, "ACNR"));
//Reply message is filled with information of the original message and MsgReplyInfo
messageObject.autoReply(replyMessage, Collections.singletonList(msgReplyInfo));
//Fill extra elements, required for the reply message
replyMessage.setElement("/Assgnmt/Id", "TESTBICA");
replyMessage.setElement("/Assgnmt/CreDtTm", Calendar.getInstance());
replyMessage.setElement("/ClmNonRctDtls/Rjctd/Cd", "ARJT");
//We need to add the camt029V08 inside a file wrapper in order for validate to work properly
FileP27 camt029v08FileWrapper = new FileP27();
//We create the FileAppHdr
FileApplicationHeaderV01 fileAppHdr = new FileApplicationHeaderV01();
fileAppHdr.setNbOfBtchs("1");
camt029v08FileWrapper.getRootMessage().setFileAppHdr(fileAppHdr);
//We create the AppHdr
BusinessApplicationHeader appHdr = new BusinessApplicationHeader();
appHdr.setElement("/Fr/FIId/FinInstnId/BICFI", "UUUUGB2L");
appHdr.setElement("/To/FIId/FinInstnId/BICFI", "UUUUGB2L");
appHdr.setElement("/BizMsgIdr", "string");
appHdr.setElement("/MsgDefIdr", OrigMsgName.CAMT_029_001_08.value());
appHdr.getRootMessage().setCreDt(DatatypeFactory.newInstance()
.newXMLGregorianCalendar((GregorianCalendar) GregorianCalendar.getInstance(TimeZone.getTimeZone(ZoneOffset.UTC))));
//We add the AppHdr and the camt029V08 in File Wrapper
camt029v08FileWrapper.addCamt029v08(new AppHdrDocument<>(appHdr, replyMessage));
camt029v08FileWrapper.validate();
Utils.printValidMessageOrErrors(camt029v08FileWrapper);
}
private static final String validPacs008String = "<ns1:Document xmlns:ns1=\"urn:P27\">\n" +
" <ns1:FileAppHdr xmlns=\"urn:file.001.001.01_B27v1\">\n" +
" <NbOfBtchs>1</NbOfBtchs>\n" +
" </ns1:FileAppHdr>\n" +
" <ns1:AppHdr xmlns=\"urn:iso:std:iso:20022:tech:xsd:head.001.001.01_B27v1\">\n" +
" <Fr>\n" +
" <FIId>\n" +
" <FinInstnId>\n" +
" <BICFI>TESTBICA</BICFI>\n" +
" </FinInstnId>\n" +
" </FIId>\n" +
" </Fr>\n" +
" <To>\n" +
" <FIId>\n" +
" <FinInstnId>\n" +
" <BICFI>TESTBICB</BICFI>\n" +
" </FinInstnId>\n" +
" </FIId>\n" +
" </To>\n" +
" <BizMsgIdr>20220516091628</BizMsgIdr>\n" +
" <MsgDefIdr>pacs.008.001.02</MsgDefIdr>\n" +
" <CreDt>2022-05-16T09:36:28Z</CreDt>\n" +
" </ns1:AppHdr>\n" +
" <ns1:CreditTransfer xmlns=\"urn:iso:std:iso:20022:tech:xsd:pacs.008.001.02_B27v1\">\n" +
" <FIToFICstmrCdtTrf>\n" +
" <GrpHdr>\n" +
" <MsgId>20220516091628</MsgId>\n" +
" <CreDtTm>2022-05-16T18:15:04+03:00</CreDtTm>\n" +
" <NbOfTxs>1</NbOfTxs>\n" +
" <TtlIntrBkSttlmAmt Ccy=\"SEK\">1000.00</TtlIntrBkSttlmAmt>\n" +
" <IntrBkSttlmDt>2022-05-16</IntrBkSttlmDt>\n" +
" <SttlmInf>\n" +
" <SttlmMtd>CLRG</SttlmMtd>\n" +
" <ClrSys>\n" +
" <Cd>B27</Cd>\n" +
" </ClrSys>\n" +
" </SttlmInf>\n" +
" <InstgAgt>\n" +
" <FinInstnId>\n" +
" <BIC>TESTBICA</BIC>\n" +
" </FinInstnId>\n" +
" </InstgAgt>\n" +
" <InstdAgt>\n" +
" <FinInstnId>\n" +
" <BIC>TESTBICB</BIC>\n" +
" </FinInstnId>\n" +
" </InstdAgt>\n" +
" </GrpHdr>\n" +
" <CdtTrfTxInf>\n" +
" <PmtId>\n" +
" <InstrId>20220516091628</InstrId>\n" +
" <EndToEndId>20220516091628</EndToEndId>\n" +
" <TxId>20220516091628</TxId>\n" +
" </PmtId>\n" +
" <PmtTpInf>\n" +
" <SvcLvl>\n" +
" <Cd>NPCA</Cd>\n" +
" </SvcLvl>\n" +
" <LclInstrm>\n" +
" <Cd>PERI</Cd>\n" +
" </LclInstrm>\n" +
" </PmtTpInf>\n" +
" <IntrBkSttlmAmt Ccy=\"SEK\">1000.00</IntrBkSttlmAmt>\n" +
" <ChrgBr>SLEV</ChrgBr>\n" +
" <Dbtr>\n" +
" <Nm>JOHN DOE</Nm>\n" +
" <PstlAdr>\n" +
" <AdrLine>ADDRESS 1</AdrLine>\n" +
" </PstlAdr>\n" +
" </Dbtr>\n" +
" <DbtrAcct>\n" +
" <Id>\n" +
" <IBAN>DK5000400440116243</IBAN>\n" +
" </Id>\n" +
" </DbtrAcct>\n" +
" <DbtrAgt>\n" +
" <FinInstnId>\n" +
" <BIC>TESTBICA</BIC>\n" +
" </FinInstnId>\n" +
" </DbtrAgt>\n" +
" <CdtrAgt>\n" +
" <FinInstnId>\n" +
" <BIC>TESTBICB</BIC>\n" +
" </FinInstnId>\n" +
" </CdtrAgt>\n" +
" <Cdtr>\n" +
" <Nm>Jane Doe</Nm>\n" +
" <PstlAdr>\n" +
" <AdrLine>Address 2</AdrLine>\n" +
" </PstlAdr>\n" +
" </Cdtr>\n" +
" <CdtrAcct>\n" +
" <Id>\n" +
" <IBAN>SE4550000000058398257466</IBAN>\n" +
" </Id>\n" +
" </CdtrAcct>\n" +
" <RmtInf>\n" +
" <Ustrd>Unstructured Remit Info</Ustrd>\n" +
" </RmtInf>\n" +
" </CdtTrfTxInf>\n" +
" </FIToFICstmrCdtTrf>\n" +
" </ns1:CreditTransfer>\n" +
"</ns1:Document>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment