Conditions | 1 |
Total Lines | 19 |
Code Lines | 16 |
Lines | 19 |
Ratio | 100 % |
Changes | 0 |
1 | """tfd http://www.sat.gob.mx/TimbreFiscalDigital""" |
||
21 | def __init__( |
||
22 | self, |
||
23 | proveedor: Signer, |
||
24 | uuid: str, |
||
25 | fecha_timbrado: datetime, |
||
26 | sello_cfd: str |
||
27 | ): |
||
28 | super().__init__({ |
||
29 | 'Version': self.version, |
||
30 | 'UUID': uuid, |
||
31 | 'FechaTimbrado': fecha_timbrado or datetime.now(tz=MEXICO_TZ).replace(tzinfo=None), |
||
32 | 'RfcProvCertif': proveedor.rfc_pac, |
||
33 | 'SelloCFD': sello_cfd, |
||
34 | 'NoCertificadoSAT': proveedor.certificate_number, |
||
35 | 'SelloSAT': '', |
||
36 | }) |
||
37 | |||
38 | self['SelloSAT'] = proveedor.sign_sha1( |
||
39 | self.cadena_original().encode() |
||
40 | ) |
||
41 |