Verificar cancelaion con certificados en CD
This commit is contained in:
parent
d70cae64b7
commit
5b997f7858
|
@ -148,7 +148,7 @@ class PACComercioDigital(object):
|
|||
return data
|
||||
|
||||
def _get_data_cancel(self, cfdi, info, auth):
|
||||
info['pass'] = ''
|
||||
# ~ info['pass'] = ''
|
||||
info['tipo'] = 'cfdi'
|
||||
info['key'] = base64.b64encode(info['key']).decode()
|
||||
info['cer'] = base64.b64encode(info['cer']).decode()
|
||||
|
|
|
@ -765,7 +765,7 @@ 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, 'args': args}
|
||||
info = {'cer': cert.cer_pem, 'key': cert.key_pem, 'pass': 'p', 'args': args}
|
||||
|
||||
result = pac.cancel(invoice.xml, info, auth)
|
||||
if pac.error:
|
||||
|
@ -779,9 +779,8 @@ def _cancel_with_cert(invoice, args, auth, certificado):
|
|||
|
||||
|
||||
def cancel_xml_sign(invoice, args, auth, certificado):
|
||||
# ~ if DEBUG:
|
||||
if auth['pac'] == 'finkok':
|
||||
return _cancel_with_cert(invoice, args, auth, certificado)
|
||||
# ~ if auth['pac'] == 'finkok':
|
||||
return _cancel_with_cert(invoice, args, auth, certificado)
|
||||
|
||||
cert = SATCertificate(certificado.cer, certificado.key_enc.encode())
|
||||
pac = PACS[auth['pac']]()
|
||||
|
|
Loading…
Reference in New Issue