Skip to content

Commit

Permalink
improve read me with text and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
phoughton committed May 25, 2024
1 parent 1ba5415 commit 10612a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@ import sys

parser = XmlParser()

# Read in a file, you can get an example PAIN (Payment Initiation) message from:
# https://developer.gs.com/docs/services/transaction-banking/pain001sample/
with open("example_files/gs_pain/pain001_001_08.xml", "rb") as xml_file:
doc: Document = parser.parse(xml_file, Document, )

# Print out the Post Code.
print(doc.cstmr_cdt_trf_initn.pmt_inf[0].dbtr.pstl_adr.pst_cd)
```

## Create a MX (ISO20022) payment message programatically:

This is an example of a realistic PACS.008 MX payment message.
This is an example of how to create a realistic PACS.008 MX payment message.

(it should write out a file called: `my_pacs_008_from_code.xml`)

Depending on your setup you may need a different or even no wrapper element (I've used <MSGRoot> here, but yours might be called something different etc)

Expand Down

0 comments on commit 10612a8

Please sign in to comment.