PIP package install:
pip install iso8583p
Follow the steps in Pypi to run the project like a python module Pypi https://pypi.org/project/iso8583p/
Install all the modules in setup.py
file path
py setup.py install
Linux user
python3 setup.py install
or with PIP
pip install iso8583p
Import the module in your python file, and run it
import iso8583p
from iso8583p import Iso8583, MemDump, Str2Bcd, IsoSpec1987BCD
IsoPacket = Iso8583(IsoSpec = IsoSpec1987BCD())
# Create an example ISO message
# 1200 Message, type Sale
IsoPacket.MTI("1200")
# Field 2
IsoPacket.Field(2, 1)
IsoPacket.FieldData(2, 8888806368324521)
# Field 3
IsoPacket.Field(3, 1)
IsoPacket.FieldData(3, 000000)
IsoPacket.PrintMessage()
data = IsoPacket.BuildIso()
data = struct.pack(b"!!", len(data)) + data
MemDump("Sending:", data)
Linux user run the command in your terminal with python3
and pip3