@@ -154,10 +154,10 @@ def _base64_to_array(self, base64_string):
154
154
155
155
def _parse_mrz (self , mrz_text , include_checkdigit = True ):
156
156
if not mrz_text :
157
- return {"status" : "FAILURE" , "message " : "No MRZ detected" }
157
+ return {"status" : "FAILURE" , "status_message " : "No MRZ detected" }
158
158
mrz_lines = mrz_text .strip ().split ("\n " )
159
159
if len (mrz_lines ) not in [2 , 3 ]:
160
- return {"status" : "FAILURE" , "message " : "Invalid MRZ format" }
160
+ return {"status" : "FAILURE" , "status_message " : "Invalid MRZ format" }
161
161
162
162
mrz_code_dict = {}
163
163
if len (mrz_lines ) == 2 :
@@ -310,9 +310,9 @@ def validate_mrz(self, mrz_text):
310
310
311
311
result = self ._parse_mrz (mrz_text )
312
312
if result .get ("status" ) == "SUCCESS" :
313
- return {"is_valid" : True , "message " : "The given mrz is valid" }
313
+ return {"is_valid" : True , "status_message " : "The given mrz is valid" }
314
314
else :
315
- return {"is_valid" : False , "message " : result .get ("message " )}
315
+ return {"is_valid" : False , "status_message " : result .get ("status_message " )}
316
316
317
317
def get_details (self , input_data , input_type = "imagepath" , ignore_parse = False , include_checkdigit = True ):
318
318
if input_type == "imagepath" :
0 commit comments