Skip to content

Commit

Permalink
fixes #180 atribute cacert=True al metodo Conectar de pyafipws
Browse files Browse the repository at this point in the history
Información al respecto:

reingart/pyafipws#76
  • Loading branch information
lukio committed Jun 24, 2020
1 parent 045e886 commit cad5cef
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions afip_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def authenticate(service, certificate, private_key, force=False,
# cryptographically sing the access ticket
cms = wsaa.SignTRA(tra, certificate, private_key)
# connect to the webservice:
wsaa.Conectar(cache, wsdl, proxy)
wsaa.Conectar(cache, wsdl, proxy, cacert=True)
# call the remote method
ta = wsaa.LoginCMS(cms)
if not ta:
Expand All @@ -79,7 +79,7 @@ def authenticate(service, certificate, private_key, force=False,
# cryptographically sing the access ticket
cms = wsaa.SignTRA(tra, certificate, private_key)
# connect to the webservice:
wsaa.Conectar(cache, wsdl, proxy)
wsaa.Conectar(cache, wsdl, proxy, cacert=True)
# call the remote method
ta = wsaa.LoginCMS(cms)
if not ta:
Expand Down
2 changes: 1 addition & 1 deletion currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_afip_rate(self, service='wsfex'):
cache_dir = afip_auth.get_cache_dir()
ws.LanzarExcepciones = True
try:
ws.Conectar(wsdl=wsdl, cache=cache_dir)
ws.Conectar(wsdl=wsdl, cache=cache_dir, cacert=True)
except Exception as e:
msg = ws.Excepcion + ' ' + str(e)
logger.error('WSAA connecting to afip: %s' % msg)
Expand Down
2 changes: 1 addition & 1 deletion invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ def conect_afip(cls, ws, wsdl, vat_number, auth_data):
cache_dir = afip_auth.get_cache_dir()
ws.LanzarExcepciones = True
try:
ws.Conectar(wsdl=wsdl, cache=cache_dir)
ws.Conectar(wsdl=wsdl, cache=cache_dir, cacert=True)
except Exception as e:
msg = ws.Excepcion + ' ' + str(e)
logger.error('WSAA connecting to afip: %s' % msg)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def get_require_version(name):
requires.append('httplib2')
requires.append('pyafipws')
requires.append('pysimplesoap')
requires.append('certifi>=2020.4.5.1')
#requires.append('suds>=0.4')

tests_require = [get_require_version('proteus'), 'pytz']
Expand Down
2 changes: 1 addition & 1 deletion tests/scenario_invoice_pos_electronic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ SetUp webservice AFIP::
>>> wsfev1.Cuit = company.party.vat_number
>>> wsfev1.Token = auth_data['token']
>>> wsfev1.Sign = auth_data['sign']
>>> wsfev1.Conectar(wsdl=URL_WSFEv1, cache=cache)
>>> wsfev1.Conectar(wsdl=URL_WSFEv1, cache=cache, cacert=True)
True

Get CompUltimoAutorizado and configure sequences::
Expand Down
2 changes: 1 addition & 1 deletion tests/scenario_invoice_pos_electronic_fce.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ SetUp webservice AFIP::
>>> wsfev1.Cuit = company.party.vat_number
>>> wsfev1.Token = auth_data['token']
>>> wsfev1.Sign = auth_data['sign']
>>> wsfev1.Conectar(wsdl=URL_WSFEv1, cache=cache)
>>> wsfev1.Conectar(wsdl=URL_WSFEv1, cache=cache, cacert=True)
True

Get CompUltimoAutorizado and configure sequences::
Expand Down
2 changes: 1 addition & 1 deletion tests/scenario_invoice_pos_electronic_wsfex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ SetUp webservice AFIP::
>>> wsfexv1.Cuit = company.party.vat_number
>>> wsfexv1.Token = auth_data['token']
>>> wsfexv1.Sign = auth_data['sign']
>>> wsfexv1.Conectar(wsdl=URL_WSFEXv1, cache=cache)
>>> wsfexv1.Conectar(wsdl=URL_WSFEXv1, cache=cache, cacert=True)
True

GetLastCMP and configure sequences::
Expand Down

0 comments on commit cad5cef

Please sign in to comment.