@@ -11,10 +11,11 @@ class PaymentResponseStatus:
11
11
12
12
class PaymentResponse :
13
13
14
- def __init__ (self , identifier = None , occurrences = None , content = None ):
14
+ def __init__ (self , identifier = None , occurrences = None , content = None , authentication = None ):
15
15
self .identifier = identifier
16
16
self .occurrences = occurrences
17
17
self .content = content or []
18
+ self .authentication = authentication
18
19
19
20
def occurrencesText (self ):
20
21
return [occurrences [occurrenceId ] for occurrenceId in self .occurrences ]
@@ -56,10 +57,13 @@ def _parseLines(cls, lines):
56
57
continue
57
58
elif line [7 ] == "1" :
58
59
currentResponse = PaymentResponse (content = [line ])
59
- elif line [7 ] == "3" :
60
+ elif line [7 ] == "3" and line [ 13 ] == "A" :
60
61
currentResponse .content .append (line )
61
62
currentResponse .identifier = cls ._getIdentifier (line )
62
63
currentResponse .occurrences = cls ._getOccurrences (line )
64
+ elif line [7 ] == "3" and line [13 ] == "Z" :
65
+ currentResponse .content .append (line )
66
+ currentResponse .authentication = cls ._getAuthentication (line )
63
67
elif line [7 ] == "5" :
64
68
currentResponse .content .append (line )
65
69
result .append (currentResponse )
@@ -77,4 +81,8 @@ def _splitString(cls, string):
77
81
78
82
@classmethod
79
83
def _getIdentifier (self , line ):
80
- return line [73 :93 ].strip ()
84
+ return line [73 :93 ].strip ()
85
+
86
+ @classmethod
87
+ def _getAuthentication (cls , line ):
88
+ return line [14 :78 ].strip ()
0 commit comments