iso8583sim.core.types
ISO8583Version
Bases: Enum
ISO 8583 protocol versions
|
V1987 | '1987' |
| V1993 | '1993' |
| V2003 | '2003' |
FieldType
Bases: Enum
Field data types in ISO 8583
|
NUMERIC | 'n' |
| ALPHA | 'a' |
| ALPHANUMERIC | 'an' |
| BINARY | 'b' |
| SPECIAL | 's' |
| TRACK2 | 'z' |
| LLVAR | 'll' |
| LLLVAR | 'lll' |
CardNetwork
Bases: Enum
Card network identifiers
|
VISA | 'VISA' |
| MASTERCARD | 'MASTERCARD' |
| AMEX | 'AMEX' |
| DISCOVER | 'DISCOVER' |
| JCB | 'JCB' |
| UNIONPAY | 'UNIONPAY' |
MessageClass
Bases: Enum
Message class identifiers (position 2 of MTI)
|
AUTHORIZATION | '1' |
| FINANCIAL | '2' |
| FILE_ACTIONS | '3' |
| REVERSAL | '4' |
| RECONCILIATION | '5' |
| ADMINISTRATIVE | '6' |
| FEE_COLLECTION | '7' |
| NETWORK_MANAGEMENT | '8' |
MessageFunction
Bases: Enum
Message function identifiers (position 3 of MTI)
|
REQUEST | '0' |
| RESPONSE | '1' |
| ADVICE | '2' |
| ADVICE_RESPONSE | '3' |
| NOTIFICATION | '4' |
| NETWORK_REQUEST | '8' |
| NETWORK_RESPONSE | '9' |
MessageOrigin
Bases: Enum
Message origin identifiers (position 4 of MTI)
|
ACQUIRER | '0' |
| ACQUIRER_REPEAT | '1' |
| ISSUER | '2' |
| ISSUER_REPEAT | '3' |
| OTHER | '4' |
| OTHER_REPEAT | '5' |
FieldDefinition
ISO8583Message
message_class
Get message class from MTI
message_function
Get message function from MTI
message_origin
Get message origin from MTI
ISO8583Error
Bases: Exception
Base exception for ISO 8583 errors
ParseError
Bases: ISO8583Error
Raised when parsing fails
ValidationError
Bases: ISO8583Error
Raised when validation fails
BuildError
Bases: ISO8583Error
Raised when message building fails
Functions
get_field_definition()
- Network-specific definition
- Version-specific definition
- Standard field definition
is_valid_mti()
- Length is 4 digits
- All characters are numeric
- Each position contains valid values