Skip to content

Commit

Permalink
Merge pull request #28 from sebastienrousseau/feat/pain001
Browse files Browse the repository at this point in the history
feat(pain001): v0.0.16
  • Loading branch information
sebastienrousseau authored May 20, 2023
2 parents 9b73d13 + 1980f2a commit d065c9e
Show file tree
Hide file tree
Showing 18 changed files with 277 additions and 116 deletions.
2 changes: 1 addition & 1 deletion TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<!-- markdownlint-enable MD033 MD041 -->

# Pain001 (v0.0.15)
# Pain001 (v0.0.16)

![Pain001 banner][banner]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# Front Matter (YAML).
## name - The name of the site. (max 64 characters)
name: pain.001.001.03
## title - The title of the page. (max 64 characters)
title: Customer Credit Transfer Initiation V3 (pain.001.001.03)
---

# Customer Credit Transfer Initiation V3 (pain.001.001.03)

## Overview

The Customer Credit Transfer Initiation V3 (`pain.001.001.03`) is an
XML-based message format under the ISO 20022 standard, designed to
streamline cross-border and domestic payment processes. With the
increasing demand for efficient, secure, and standardized payment
methods, financial institutions and their customers face challenges
related to the complexity, speed, and cost of executing credit transfers.

## Features/Benefits

- **Standardized Format:** The pain.001.001.03 message format provides a consistent structure for initiating credit transfers, making it easier for financial institutions to process and manage transactions.
- **Increased Efficiency:** By adopting the pain.001.001.03 format, financial institutions can automate and streamline the credit transfer initiation process, reducing manual intervention and errors.
- **Enhanced Remittance Data:** The format allows for more extensive remittance information, providing clearer transaction details for both sender and receiver.
- **Improved Compliance:** The standardized message structure helps organizations meet regulatory requirements and reduces the risk of non-compliance penalties.
- **Interoperability:** The pain.001.001.03 format is compatible with other ISO 20022 messages, facilitating seamless communication between different financial institutions and systems.

## Market Opportunity

The adoption of `pain.001.001.03` presents a significant market
opportunity for financial institutions.

By implementing this message format, organizations can:

- Enhance customer experience by offering faster and more transparent transactions
- Improve operational efficiency and reduce costs associated with manual processing
- Position themselves as industry leaders in adopting global standards for payment processing
- Leverage the ISO 20022 standard to explore new business opportunities and partnerships
- Ensure compliance with evolving regulatory requirements and stay ahead of the competition
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# Front Matter (YAML).
## name - The name of the site. (max 64 characters)
name: pain.001.001.09
## title - The title of the page. (max 64 characters)
title: Customer Credit Transfer Initiation V9 (pain.001.001.09)
---


# Customer Credit Transfer Initiation V9 (pain.001.001.09)

## Overview

The Customer Credit Transfer Initiation V9 (`pain.001.001.09`) is an XML
-based message format under the ISO 20022 standard, designed to
streamline cross-border and domestic payment processes. It is the
successor to the Customer Credit Transfer Initiation V3 (`pain.001.001.
03`) message format, and includes a number of enhancements that improve
the efficiency, security, and flexibility of payment processing.

## Features/Benefits

The `pain.001.001.09` message format offers a number of features and
benefits over the previous version, including:

- **Enhanced data richness**: The format includes additional data
elements that provide more detailed information about the payment,
such as the purpose of the payment, the tax identification numbers of
the sender and receiver, and the reason for the payment.
- **Improved flexibility**: The format allows for more flexible payment
instructions, such as the ability to specify multiple payment
beneficiaries and the ability to split payments between multiple
accounts.
- **Increased security**: The format includes a number of security
features that help to protect payments from fraud and errors, such as
digital signatures and encryption.
- **Improved interoperability**: The format is compatible with other
ISO 20022 messages, which facilitates seamless communication between
different financial institutions and systems.

## Market Opportunity

The adoption of `pain.001.001.09` presents a significant market
opportunity for financial institutions. By implementing this message
format, organizations can:

- Enhance customer experience by offering faster and more transparent payments
- Improve operational efficiency and reduce costs associated with manual processing
- Position themselves as industry leaders in adopting global standards for payment processing
- Leverage the ISO 20022 standard to explore new business opportunities and partnerships
- Ensure compliance with evolving regulatory requirements and stay ahead of the competition
2 changes: 1 addition & 1 deletion pain001/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@

"""The Python pain001 module."""
__all__ = ["pain001"]
__version__ = "0.0.15"
__version__ = "0.0.16"
86 changes: 53 additions & 33 deletions pain001/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,60 @@


cli_string = """
Pain001 is a Python Library for Automating ISO 20022-Compliant Payment Files
Using CSV Data.
usage:
python3 -m pain001 <xml_message_type><xml_file_path> <xsd_file_path>
<csv_file_path>
Python Pain001 is a Python package that generates a Customer-to-Bank
Credit Transfer payload in the pain.001.001.03 format from a CSV file.
The package is named after the standard file format for SEPA and
non-SEPA Credit Transfer, which is the Pain (payment initiation)
format 001.001.03. The Pain001 library provides a convenient way for
developers to create payment files in this format and to validate
the generated files against the XSD schema.
It offers a streamlined solution for reducing complexity and costs associated
with payment processing. By providing a simple and efficient method to create
ISO 20022-compliant payment files, it eliminates the manual effort of file
creation and validation. This not only saves valuable time and resources but
also minimizes the risk of errors, ensuring accurate and seamless payment
processing.
Usage:
python3 -m pain001 <xml_message_type> <xml_file_path> <xsd_file_path>
<csv_file_path>
The first argument is the path of the XML template file. The second
argument is the path of the XSD template file. The third argument is
the path of the CSV file containing the payment data."""
python3 -m pain001 \
<xml_message_type> \
<xml_file_path> \
<xsd_file_path> \
<csv_file_path>
Arguments:
xml_message_type: The type of XML message. Valid values are:
- pain.001.001.03
- pain.001.001.09
xml_file_path: The path to the XML template file.
xsd_file_path: The path to the XSD template file.
csv_file_path: The path to the CSV data file.
Example:
python3 -m pain001 "pain.001.001.09" \
./templates/pain.001.001.09/template.xml \
./templates/pain.001.001.09/pain.001.001.09.xsd \
./templates/pain.001.001.09/template.csv
This command will generate a pain.001.001.09 XML file using the template
files in the ./templates/pain.001.001.09/ directory and the CSV data in
./templates/pain.001.001.09/template.csv.
The generated XML file will be saved in the <xml_message_type> directory.
For example, if the <xml_message_type> is pain.001.001.09, the generated
XML file will be saved in the directory pain.001.001.09 and the file name
will be pain.001.001.09.xml.
Note: The generated XML file will be validated against the XSD template
file before being saved. If the validation fails, the program will exit
with an error message.
For more information, please visit
https://github.com/sebastienrousseau/pain001
"""


def main(
xml_message_type=None,
xml_file_path=None,
xsd_file_path=None,
csv_file_path=None
csv_file_path=None,
):
"""
Entrypoint for pain001 when invoked as a module with
Expand All @@ -71,28 +98,24 @@ def main(
logger = context.Context.get_instance().get_logger()

if (
xml_file_path is None or
xsd_file_path is None or
csv_file_path is None
xml_file_path is None
or xsd_file_path is None
or csv_file_path is None
):
parser = argparse.ArgumentParser(
description="Generate Pain.001 file from CSV data"
)
parser.add_argument(
"xml_message_type",
help="Type of XML message"
"xml_message_type", help="Type of XML message"
)
parser.add_argument(
"xml_file_path",
help="Path to XML template file"
"xml_file_path", help="Path to XML template file"
)
parser.add_argument(
"xsd_file_path",
help="Path to XSD template file"
"xsd_file_path", help="Path to XSD template file"
)
parser.add_argument(
"csv_file_path",
help="Path to CSV data file"
"csv_file_path", help="Path to CSV data file"
)
args = parser.parse_args()

Expand Down Expand Up @@ -132,10 +155,7 @@ def main(
sys.exit(1)

process_files(
xml_message_type,
xml_file_path,
xsd_file_path,
csv_file_path
xml_message_type, xml_file_path, xsd_file_path, csv_file_path
)


Expand Down
Loading

0 comments on commit d065c9e

Please sign in to comment.