From d237b33020ad348d93fdb5258193365718121fb6 Mon Sep 17 00:00:00 2001 From: El Mau Date: Sat, 22 Jan 2022 19:47:41 -0600 Subject: [PATCH] =?UTF-8?q?Verificar=20cancelaci=C3=B3n=20con=20certificad?= =?UTF-8?q?os=20en=20CD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/app/controllers/pacs/cfdi_cert.py | 1 + source/app/controllers/utils.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/app/controllers/pacs/cfdi_cert.py b/source/app/controllers/pacs/cfdi_cert.py index fe1cf61..c4a549a 100644 --- a/source/app/controllers/pacs/cfdi_cert.py +++ b/source/app/controllers/pacs/cfdi_cert.py @@ -28,6 +28,7 @@ class SATCertificate(object): self._init_values() self._get_data_cer(cer) self._get_data_key(key, password) + self._p = self._get_hash() def _init_values(self): self._rfc = '' diff --git a/source/app/controllers/utils.py b/source/app/controllers/utils.py index 7e608e3..f6bb2a9 100644 --- a/source/app/controllers/utils.py +++ b/source/app/controllers/utils.py @@ -765,7 +765,8 @@ def get_pac_by_rfc(cfdi): def _cancel_with_cert(invoice, args, auth, certificado): cert = SATCertificate(certificado.cer, certificado.key_enc.encode()) pac = PACS[auth['pac']]() - info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'pass': 'p', 'args': args} + info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'pass': cert._p, 'args': args} + # ~ print(info['pass']) result = pac.cancel(invoice.xml, info, auth) if pac.error: