forked from elmau/empresa-libre
Agregar certificado original
This commit is contained in:
parent
0422eece40
commit
702aa264d8
|
@ -172,7 +172,7 @@ class PACComercioDigital(object):
|
||||||
def _get_data_cancel(self, cfdi, info, auth):
|
def _get_data_cancel(self, cfdi, info, auth):
|
||||||
info['tipo'] = 'cfdi'
|
info['tipo'] = 'cfdi'
|
||||||
info['key'] = base64.b64encode(info['key_enc']).decode()
|
info['key'] = base64.b64encode(info['key_enc']).decode()
|
||||||
info['cer'] = base64.b64encode(info['cer']).decode()
|
info['cer'] = base64.b64encode(info['cer_ori']).decode()
|
||||||
|
|
||||||
NS_CFDI = {
|
NS_CFDI = {
|
||||||
'cfdi': 'http://www.sat.gob.mx/cfd/3',
|
'cfdi': 'http://www.sat.gob.mx/cfd/3',
|
||||||
|
|
|
@ -766,7 +766,7 @@ def _cancel_with_cert(invoice, args, auth, certificado):
|
||||||
cert = SATCertificate(certificado.cer, certificado.key_enc.encode())
|
cert = SATCertificate(certificado.cer, certificado.key_enc.encode())
|
||||||
pac = PACS[auth['pac']]()
|
pac = PACS[auth['pac']]()
|
||||||
# ~ info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'pass': '', 'args': args}
|
# ~ info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'pass': '', 'args': args}
|
||||||
info = {'cer': cert.cer_pem, 'key': cert.key_pem,
|
info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'cer_ori': cert.cer,
|
||||||
'key_enc': cert._key_der, 'pass': cert._p, 'args': args}
|
'key_enc': cert._key_der, 'pass': cert._p, 'args': args}
|
||||||
|
|
||||||
result = pac.cancel(invoice.xml, info, auth)
|
result = pac.cancel(invoice.xml, info, auth)
|
||||||
|
|
Loading…
Reference in New Issue