Verificar cancelación con certificados en CD
This commit is contained in:
parent
5b997f7858
commit
d237b33020
|
@ -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 = ''
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue