@@ -1070,12 +1070,14 @@ class NeedTANResponse(NeedRetryResponse):
10701070 challenge_hhduc = None #: HHD_UC challenge to be transmitted to the TAN generator
10711071 challenge_matrix = None #: Matrix code challenge: tuple(mime_type, data)
10721072 decoupled = None #: Use decoupled process
1073+ vop_result = None # VoC result to either send an accept reply with TAN (on full match) or display a warning (otherwise; reply already sent)
10731074
1074- def __init__ (self , command_seg , tan_request , resume_method = None , tan_request_structured = False , decoupled = False ):
1075+ def __init__ (self , command_seg , tan_request , resume_method = None , tan_request_structured = False , decoupled = False , vop_result = None ):
10751076 self .command_seg = command_seg
10761077 self .tan_request = tan_request
10771078 self .tan_request_structured = tan_request_structured
10781079 self .decoupled = decoupled
1080+ self .vop_result = vop_result
10791081 if hasattr (resume_method , '__func__' ):
10801082 self .resume_method = resume_method .__func__ .__name__
10811083 else :
@@ -1390,7 +1392,6 @@ def _send_pay_with_possible_retry(self, dialog, command_seg, resume_func):
13901392 segments = vop_seg + [command_seg , tan_seg ]
13911393 response = dialog .send (* segments )
13921394 print ("WARNING! Recipient name differs:" , vop_result .close_match_name )
1393-
13941395 print (vop_result .result )
13951396 for resp in response .responses (tan_seg ):
13961397 if resp .code in ('0030' , '3955' ):
@@ -1400,6 +1401,7 @@ def _send_pay_with_possible_retry(self, dialog, command_seg, resume_func):
14001401 resume_func ,
14011402 self .is_challenge_structured (),
14021403 resp .code == '3955' ,
1404+ hivpp ,
14031405 )
14041406 if resp .code .startswith ('9' ):
14051407 raise Exception ("Error response: {!r}" .format (response ))
@@ -1434,7 +1436,12 @@ def send_tan(self, challenge: NeedTANResponse, tan: str):
14341436 tan_seg = self ._get_tan_segment (challenge .command_seg , '2' , challenge .tan_request )
14351437 self ._pending_tan = tan
14361438
1437- response = dialog .send (tan_seg )
1439+ vop_seg = []
1440+ print (challenge .vop_result )
1441+ if challenge .vop_result and challenge .vop_result .vop_single_result .result == 'RCVC' :
1442+ vop_seg = [HKVPA1 (vop_id = challenge .vop_result .vop_id )]
1443+ segments = vop_seg + [tan_seg ]
1444+ response = dialog .send (* segments )
14381445
14391446 if challenge .decoupled :
14401447 # TAN process = S
0 commit comments