spei-python 0.48.7__py3-none-any.whl → 0.48.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
spei/resources/mensaje.py CHANGED
@@ -17,9 +17,13 @@ class Mensaje(BaseModel):
17
17
 
18
18
  @classmethod
19
19
  def parse_xml(cls, mensaje): # noqa: WPS210
20
- decoded = mensaje.decode('latin1').replace('&', '&')
21
- encoded = decoded.encode('utf-8')
22
- mensaje = etree.fromstring(encoded) # noqa: S320
20
+ is_ensesion = mensaje.find(b'ENSESION')
21
+ if is_ensesion == -1:
22
+ decoded = mensaje.decode('utf-8')
23
+ else:
24
+ decoded = mensaje.decode('latin1').replace('&', '&')
25
+
26
+ mensaje = etree.fromstring(bytes(decoded, encoding='utf-8')) # noqa: S320
23
27
  body = mensaje.find(
24
28
  '{http://schemas.xmlsoap.org/soap/envelope/}Body',
25
29
  )
@@ -28,7 +32,7 @@ class Mensaje(BaseModel):
28
32
 
29
33
  if ordenpago is not None:
30
34
  element = etree.fromstring( # noqa: S320
31
- bytes(ordenpago.text.strip(), encoding='utf-8'),
35
+ bytes(ordenpago.text.strip(), encoding='cp850'),
32
36
  )
33
37
  categoria = element.attrib['categoria']
34
38
 
spei/responses/orden.py CHANGED
@@ -31,5 +31,7 @@ class BodyElement(object):
31
31
 
32
32
  class OrdenResponse(object):
33
33
  def __new__(cls, orden):
34
- mensaje = etree.fromstring(orden) # noqa: S320
34
+ mensaje = etree.fromstring( # noqa: S320
35
+ bytes(orden, encoding='utf-8'),
36
+ )
35
37
  return OrdenPagoElement(MensajeElement(RootElement(BodyElement(mensaje))))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spei-python
3
- Version: 0.48.7
3
+ Version: 0.48.8
4
4
  Summary:
5
5
  Author: tech
6
6
  Author-email: tech@fondeadora.com
@@ -20,13 +20,13 @@ spei/resources/__init__.py,sha256=cJL9KI0ZBKHcDN5me8yuvschQMW1HH_bpLS7TnLXZw4,48
20
20
  spei/resources/acuse.py,sha256=y7j2e99pJ7LYprZvhVpf_OTLONdtNJJ49uK_jddOCRg,5475
21
21
  spei/resources/cda.py,sha256=AHGPC6JUx9NYWAtJogxVDyXpISz_psOdfUiuD46h73g,2327
22
22
  spei/resources/ensesion.py,sha256=9sHwVxav17tANds3RGZJAPfoQQM_-thhZS-2iUzqo0Y,1585
23
- spei/resources/mensaje.py,sha256=XqoOHWCE5nKIvAjrK01rahl9a7Acg8cFcmLKxHxCGOI,1642
23
+ spei/resources/mensaje.py,sha256=J6nVaCvTEQsXxmyrPUmUIu8yjkuZCAO6wfL3Ym0zAgE,1768
24
24
  spei/resources/orden.py,sha256=ifYkuSyj1lutOZ2c_YABmmxrxwXXj3zQC6cKS4Z6m6k,6273
25
25
  spei/resources/payments.py,sha256=pt8xvwRUfcTq3jEFlnG28T4mE7MYpZSCkXgseqD22yY,8103
26
26
  spei/resources/respuesta.py,sha256=RKzkv52zLzm5BBjCyxrC75KZT9rUKFLwedd-JDZ3uNU,1188
27
27
  spei/responses/__init__.py,sha256=VBPhGtnbW3dG97vSTzEcpfJ1A9-Xv1CNB2YoIglX_9M,241
28
28
  spei/responses/acuse.py,sha256=ZGfP45XYvDSDbgfSKWeraDpFApDc0oks05_tQH-bwzM,650
29
- spei/responses/orden.py,sha256=I6WK7Y_sZPMq5SmC9Ru3UllW4w79wju_JzM5MluFiWE,981
29
+ spei/responses/orden.py,sha256=YG7uIbu4kfm33XV6RyQ2BK3tmUvyG0_sU6PsBFawUq0,1029
30
30
  spei/responses/respuesta.py,sha256=sbsoacmIqZdiFde0K5AuC7ypPD0lpi6HxpBA0C0K79Q,1015
31
31
  spei/sice.py,sha256=gFypsZ0Z8jX-Ro0KOJ78PzoofkvH9L0p6WIEzvZQ0IY,1085
32
32
  spei/types/__init__.py,sha256=FKFSe-eTgKjf0qFSMqYZDkgYYIT3-5Je4Wc5QRNAp7U,643
@@ -34,6 +34,6 @@ spei/types/sice.py,sha256=xFSoiLklRNWXoWwZXpSN8-SdkliNK23_MZbhcOc7a9s,222
34
34
  spei/types/spei.py,sha256=-q37jEKyxyg5yUVg9rmA_-d6u0dCg2e7LlAUbKFxAGg,4735
35
35
  spei/utils.py,sha256=Lje_sg6hLKQxsPmqf7ovVKKVcGZi7LlgNNg1MRtWnRo,247
36
36
  spei/validators.py,sha256=1b-brOmNesdiUi2X0LV0-Km4Sh6RGNeKNeAxshQXtOs,742
37
- spei_python-0.48.7.dist-info/METADATA,sha256=D3vJyo_2wHgH-KBmoJxU6Bul41rSI9gZxEBIYgwOF4A,3812
38
- spei_python-0.48.7.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
39
- spei_python-0.48.7.dist-info/RECORD,,
37
+ spei_python-0.48.8.dist-info/METADATA,sha256=KpggU-hd-W5gt-kXb-2DzP0E7EV2VfQ7WbeNrF-86Dg,3812
38
+ spei_python-0.48.8.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
39
+ spei_python-0.48.8.dist-info/RECORD,,