spei-python 0.12.1__py3-none-any.whl → 0.12.3__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/README.md +181 -0
- spei/errors.py +266 -261
- spei/resources/__init__.py +1 -1
- spei/resources/orden.py +56 -3
- spei/types.py +9 -0
- {spei_python-0.12.1.dist-info → spei_python-0.12.3.dist-info}/METADATA +41 -1
- {spei_python-0.12.1.dist-info → spei_python-0.12.3.dist-info}/RECORD +8 -7
- {spei_python-0.12.1.dist-info → spei_python-0.12.3.dist-info}/WHEEL +0 -0
spei/README.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# RegistraOrden
|
|
2
|
+
Create a new order in SPEI as XML based on [mensaje.xsd](https://drive.google.com/file/d/1bf28_MmSRywfCvIwcPO2IyaEOwPFvKlJ/view?usp=sharing) and returns a response XML.
|
|
3
|
+
|
|
4
|
+
**op_fecha_oper** - int **_required_** This should match karpay date of operation.
|
|
5
|
+
|
|
6
|
+
**op_folio** - str **_required_** This should be -1 when category is CARGAR_ODP.
|
|
7
|
+
|
|
8
|
+
**op_monto** - str **_required_** Order amount as **string**.
|
|
9
|
+
|
|
10
|
+
**op_tp_clave** [int](/spei/types.py#4) **_required_** This should be **1** for third to third payments.
|
|
11
|
+
|
|
12
|
+
**op_cve_rastreo** - str **_required_** Unique transfer tracking code. (?)
|
|
13
|
+
|
|
14
|
+
**op_estado** - [int](/spei/types.py#74) **_required_** Order status.
|
|
15
|
+
|
|
16
|
+
**op_tipo_orden** - [int](/spei/types.py#31) **_required_** Order type.
|
|
17
|
+
|
|
18
|
+
**op_prioridad** - [int](/spei/types.py#56) **_required_** Order priority.
|
|
19
|
+
|
|
20
|
+
**op_me_clave** - [int](/spei/types.py#89) **_required_** Order transmission method
|
|
21
|
+
|
|
22
|
+
**op_topologia** - str **_required_** Order SPEI notification mechanism.
|
|
23
|
+
|
|
24
|
+
**op_usu_clave** - str **_required_** Username who generated the order and should be defined in karpay catalog.
|
|
25
|
+
|
|
26
|
+
**op_ins_clave** - digits(5, 5) **_required_** Registered institution code, this is provided by BANXICO
|
|
27
|
+
|
|
28
|
+
**op_fecha_cap** - int Order captured timestamp inside E-Karpay (yyyymmdd)
|
|
29
|
+
|
|
30
|
+
Optional depending on order type
|
|
31
|
+
|
|
32
|
+
**op_clave** - int Unique E-Karpay identifier
|
|
33
|
+
|
|
34
|
+
**op_nom_ord** - str Payer full name.
|
|
35
|
+
|
|
36
|
+
**op_ord_clave** - [int](/spei/types.py#81) Payer account institution code
|
|
37
|
+
|
|
38
|
+
**op_tc_clave_ord** - [int](/spei/types.py#36) Payer account type.
|
|
39
|
+
|
|
40
|
+
**op_cuenta_ord** - int Payer account number
|
|
41
|
+
|
|
42
|
+
**op_rfc_curp_ord** - str Payer identification number
|
|
43
|
+
|
|
44
|
+
**op_nom_ben** - str Beneficiary full name
|
|
45
|
+
|
|
46
|
+
**op_tc_clave_ben** - [int](/spei/types.py#36) Beneficiary account type
|
|
47
|
+
|
|
48
|
+
**op_cuenta_ben** - str Beneficiary Account number
|
|
49
|
+
|
|
50
|
+
**op_rfc_curp_ben** str Beneficiary identification number
|
|
51
|
+
|
|
52
|
+
**op_nom_ben_2** - str Additional beneficiary name
|
|
53
|
+
|
|
54
|
+
**op_tc_clave_ben_2** - [int](/spei/types.py#36) Additional beneficiary account type
|
|
55
|
+
|
|
56
|
+
**op_cuenta_ben_2** - str Additional beneficiary Account number
|
|
57
|
+
|
|
58
|
+
**op_rfc_curp_ben_2** - str Additional beneficiary identification number
|
|
59
|
+
|
|
60
|
+
**op_concepto_pago** - str Used when op_tp_clave requires a concept of maximum length of 210.
|
|
61
|
+
|
|
62
|
+
**op_concepto_pag_2** - str Used when op_tp_clave requires a concept of maximum length of 40.
|
|
63
|
+
|
|
64
|
+
**op_iva** float - Order correspinding taxes (if applicable)
|
|
65
|
+
|
|
66
|
+
**op_ref_numerica** str Order reference number
|
|
67
|
+
|
|
68
|
+
**op_ref_cobranza** - str Only used for root account payments reference.
|
|
69
|
+
|
|
70
|
+
**op_to_clave** - [int](/spei/types.py#4) Operation type that the ordering client wishes to settle with the bank.
|
|
71
|
+
|
|
72
|
+
**op_cd_clave** - [int] Devolution cause
|
|
73
|
+
|
|
74
|
+
**op_folio_servidor** - int Server invoice number
|
|
75
|
+
|
|
76
|
+
**op_usu_autoriza** - str Order's user authorization name
|
|
77
|
+
|
|
78
|
+
**op_err_clave** - [int](/spei/errors.py) Order error code
|
|
79
|
+
|
|
80
|
+
**op_razon_rechazo** - str Order rejection description
|
|
81
|
+
|
|
82
|
+
**op_hora_cap** - int Order captured hour timestamp (hhmmss)
|
|
83
|
+
|
|
84
|
+
**op_hora_liq_bm** - int Order settlement hour timestamp on BANXICO (hhmmss)
|
|
85
|
+
|
|
86
|
+
**op_hora_liq_sist** - int Order settlement hour timestamp on E-Karpay
|
|
87
|
+
|
|
88
|
+
**op_cde** - string ODP Original encryption code
|
|
89
|
+
|
|
90
|
+
**op_cuenta_dev** - string Property only used by scotiaBank
|
|
91
|
+
|
|
92
|
+
**op_hora_lecturaHost** - int Order read at hour timestamp on E-Karpay (hhmmss)
|
|
93
|
+
|
|
94
|
+
**op_hora_insercion** - int Order saved at hour timestamp on E-Karpay (hhmmss)
|
|
95
|
+
|
|
96
|
+
**hr_deposito_acuse_banxico** - int Order settled at hour timestamp on E-Karpay (hhmmss)
|
|
97
|
+
|
|
98
|
+
**paq_folio** - int Invoice package number
|
|
99
|
+
|
|
100
|
+
**ah_ar_clave** - int Area code
|
|
101
|
+
|
|
102
|
+
**emp_clave** - int Company code
|
|
103
|
+
|
|
104
|
+
**paq_folio_ori** - int Original invoice package number
|
|
105
|
+
|
|
106
|
+
**op_folio_ori** - int Original invoice number
|
|
107
|
+
|
|
108
|
+
**op_rastreo_ori** - str Original tracking code
|
|
109
|
+
|
|
110
|
+
**op_monto_intereses** - float Gross order amount
|
|
111
|
+
|
|
112
|
+
**op_info_factura** - str Bill information
|
|
113
|
+
|
|
114
|
+
**op_indica_ben_rec** - str Beneficiary name
|
|
115
|
+
|
|
116
|
+
**op_firma_dig** - str Order signature generated through algorithm.
|
|
117
|
+
|
|
118
|
+
<--- CODI --->
|
|
119
|
+
|
|
120
|
+
**op_num_cel_ord** - int Payer phone number
|
|
121
|
+
|
|
122
|
+
**op_digito_ver_ord** - int Payer verification digit number
|
|
123
|
+
|
|
124
|
+
**op_num_cel_ben** - int Beneficiary phone number
|
|
125
|
+
|
|
126
|
+
**op_digito_ver_ben** - int Beneficiary verification digit number
|
|
127
|
+
|
|
128
|
+
**op_folio_codi** - str Digital invoice scheme
|
|
129
|
+
|
|
130
|
+
**op_comision_trans** - int Operation comission
|
|
131
|
+
|
|
132
|
+
**op_monto_comision** - float Comission Amount
|
|
133
|
+
|
|
134
|
+
**op_cert_comer_env** - int certificate serial number
|
|
135
|
+
|
|
136
|
+
**op_digito_ver_comer** - int Merchant verification digit number
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
## Order Types
|
|
140
|
+
You must use one of our available order types.
|
|
141
|
+
|
|
142
|
+
- [Tercero A Tercero](/spei/resources/orden.py#107)
|
|
143
|
+
|
|
144
|
+
## Request
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
order = client.registra_orden({
|
|
148
|
+
'op_fecha_oper': 20230309,
|
|
149
|
+
'op_folio': 1
|
|
150
|
+
'op_ins_clave': 90699,
|
|
151
|
+
'op_monto': 1000,
|
|
152
|
+
'op_tp_clave': 1,
|
|
153
|
+
'op_cve_rastreo': 'TERCERO001',
|
|
154
|
+
'op_estado': 'A',
|
|
155
|
+
'op_tipo_orden': 'E',
|
|
156
|
+
'op_prioridad': 0,
|
|
157
|
+
'op_me_clave': 2,
|
|
158
|
+
'op_topologia': 'V'
|
|
159
|
+
'op_usu_clave': 'ADMIN',
|
|
160
|
+
'op_ord_clave': '90699',
|
|
161
|
+
'op_nom_ord': 'ORDENANTE',
|
|
162
|
+
'op_tc_clave_ord': '40',
|
|
163
|
+
'op_cuenta_ord': '646731258600008291',
|
|
164
|
+
'op_rfc_curp_ord': 'HEHJ891212MOCRRB04',
|
|
165
|
+
'op_nom_ben': 'BENEFICIARIO',
|
|
166
|
+
'op_tc_clave_ben': '40',
|
|
167
|
+
'op_cuenta_ben': '519526509743147521',
|
|
168
|
+
'op_concepto_pag_2': 'servicios',
|
|
169
|
+
'op_ref_numerica': '567',
|
|
170
|
+
'op_firma_dig': 'FIRMADIGITAL001'
|
|
171
|
+
})
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
The actual payload will look something like this.
|
|
175
|
+
|
|
176
|
+
[Order XML](../tests/fixtures/orden.xml)
|
|
177
|
+
|
|
178
|
+
## Response
|
|
179
|
+
We **must** always return XML as defined in [respuesta](/spei/resources/respuesta.py#8).
|
|
180
|
+
|
|
181
|
+
[Respuesta XML](../tests/fixtures/respuesta.xml)
|
spei/errors.py
CHANGED
|
@@ -16,383 +16,388 @@ class GenericoCodigoError(str, Enum):
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class NombreOrdenanteCodigoError(str, Enum):
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
nombre_ordenante_requerido = 11
|
|
20
|
+
nombre_ordenante_excede_longitud = 12
|
|
21
|
+
nombre_ordenante_invalido = 13
|
|
22
|
+
nombre_ordenante_vacio = 14
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class TipoCuentaOrdenanteCodigoError(str, Enum):
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
tipo_cuenta_ordenante_requerido = 15
|
|
27
|
+
tipo_cuenta_ordenante_invalido = 16
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class CuentaOrdenanteCodigoError(str, Enum):
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
cuenta_ordenante_requerida = 17
|
|
32
|
+
cuenta_ordenante_solo_digitos = 18
|
|
33
|
+
cuenta_ordenante_excede_longitud = 19
|
|
34
|
+
cuenta_ordenante_solo_ceros = 20
|
|
35
|
+
cuenta_ordenante_clabe_longitud_incorrecta = 21
|
|
36
|
+
cuenta_ordenante_tarjeta_longitud_incorrecta = 22
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
class IdentificacionCuentaOrdenanteCodigoError(str, Enum):
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
identification_cuenta_ordenante_invalida = 23
|
|
41
|
+
identification_cuenta_ordenante_excede_longitud = 24
|
|
42
|
+
identification_cuenta_ordenante_caracteres_invalidos = 25
|
|
43
|
+
identification_cuenta_ordenante_vacio = 26
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
class NombreBeneficiarioCodigoError(str, Enum):
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
nombre_beneficiario_requerido = 27
|
|
48
|
+
nombre_beneficiario_excede_longitud = 28
|
|
49
|
+
nombre_beneficiario_caracters_invalidos = 29
|
|
50
|
+
nombre_beneficiario_vacio = 30
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
class TipoCuentaBeneficiarioCodigoError(str, Enum):
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
tipo_cuenta_beneficiario_requerido = 31
|
|
55
|
+
tipo_cuenta_beneficiario_invalido = 32
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
class CuentaBeneficiarioCodigoError(str, Enum):
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
cuenta_beneficiario_requerida = 33
|
|
60
|
+
cuenta_beneficiario_solo_digitos = 34
|
|
61
|
+
cuenta_beneficiario_excede_longitud = 35
|
|
62
|
+
cuenta_beneficiario_solo_ceros = 36
|
|
63
|
+
cuenta_beneficiario_clabe_longitud_incorrecta = 37
|
|
64
|
+
cuenta_beneficiario_tarjeta_longitud_incorrecta = 38
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
class IdentificacionBeneficiarioCodigoError(str, Enum):
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
identificacion_beneficiario_invalida = 39
|
|
69
|
+
identificacion_beneficiario_excede_longitud = 40
|
|
70
|
+
identificacion_beneficiario_caracteres_invalidos = 41
|
|
71
|
+
identificacion_beneficiario_vacio = 42
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
class ConceptoCodigoError(str, Enum):
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
concepto_requerido = 43
|
|
76
|
+
concepto_excede_longitud = 44
|
|
77
|
+
concepto_invalido = 45
|
|
78
|
+
concepto_vacio = 46
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
class IvaCodigoError(str, Enum):
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
iva_requerido = 47
|
|
83
|
+
iva_mayor_a_cero = 48
|
|
84
|
+
iva_menor_a_maximo = 49 # 9999999999999999.99
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
class ReferenciaCodigoError(str, Enum):
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
referencia_requerida = 50
|
|
89
|
+
referencia_mayor_a_cero = 51
|
|
90
|
+
referencia_excede_longitud = 52
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
class ReferenciaCobranzaCodigoError(str, Enum):
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
referencia_cobranza_requerida = 53
|
|
95
|
+
referencia_cobranza_invalida = 54
|
|
96
|
+
referencia_cobranza_excede_longitud = 55
|
|
97
|
+
referencia_cobranza_solo_ceros = 56
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
class ClavePagoCodigoError(str, Enum):
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
clave_pago_requerida = 57
|
|
102
|
+
clave_pago_excede_longitud = 58
|
|
103
|
+
clave_pago_invalida = 59
|
|
104
|
+
clave_pago_vacia = 60
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
class NombreBeneficiario2CodigoError(str, Enum):
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
nombre_beneficiario_2_requerido = 61
|
|
109
|
+
nombre_beneficiario_2_excede_longitud = 62
|
|
110
|
+
nombre_beneficiario_2_caracters_invalidos = 63
|
|
111
|
+
nombre_beneficiario_2_vacio = 64
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
class TipoCuentaBeneficiario2CodigoError(str, Enum):
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
tipo_cuenta_beneficiario_2_requerido = 65
|
|
116
|
+
tipo_cuenta_beneficiario_2_invalido = 66
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
class CuentaBeneficiario2CodigoError(str, Enum):
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
cuenta_beneficiario_2_requerida = 67
|
|
121
|
+
cuenta_beneficiario_2_solo_digitos = 68
|
|
122
|
+
cuenta_beneficiario_2_excede_longitud = 69
|
|
123
|
+
cuenta_beneficiario_2_solo_ceros = 70
|
|
124
|
+
cuenta_beneficiario_2_clabe_longitud_incorrecta = 71
|
|
125
|
+
cuenta_beneficiario_2_tarjeta_longitud_incorrecta = 72
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
class IdentificacionBeneficiario2CodigoError(str, Enum):
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
identificacion_beneficiario_2_invalida = 73
|
|
130
|
+
identificacion_beneficiario_2_excede_longitud = 74
|
|
131
|
+
identificacion_beneficiario_2_caracteres_invalidos = 75
|
|
132
|
+
identificacion_beneficiario_2_vacio = 76
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
class Concepto2CodigoError(str, Enum):
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
concepto_2_requerido = 77
|
|
137
|
+
concepto_2_excede_longitud = 78
|
|
138
|
+
concepto_2_invalido = 79
|
|
139
|
+
concepto_2_vacio = 80
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
class TipoOperacionCodigoError(str, Enum):
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
tipo_operacion_requerido = 81
|
|
144
|
+
tipo_operacion_invalido = 82
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
class MedioEntregaCodigoError(str, Enum):
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
medio_entrega_requerido = 83
|
|
149
|
+
medio_entrega_invalido = 84
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
class PrioridadCodigoError(str, Enum):
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
prioridad_requerido = 85
|
|
154
|
+
prioridad_invalido = 86
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
class TopologiaCodigoError(str, Enum):
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
topologia_requerido = 87
|
|
159
|
+
topologia_invalido = 88
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
class ClaveRastreoCodigoError(str, Enum):
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
clave_rastreo_excede_longitud = 89
|
|
164
|
+
clave_rastreo_invalido = 90
|
|
165
|
+
clave_rastreo_vacio = 91
|
|
166
|
+
clave_rastreo_requerida = 92
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
class OtrosCodigoError(str, Enum):
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
170
|
+
otros_fecha_operacion_requerido = 93
|
|
171
|
+
otros_tipo_traspaso_requerido = 94
|
|
172
|
+
otros_tipo_traspaso_invalido = 95
|
|
173
|
+
otros_medio_entrega_vacio = 96
|
|
174
|
+
otros_usuario_captura_requerido = 97
|
|
175
|
+
otros_estado_envio_requerido = 98
|
|
176
|
+
otros_estado_envio_invalido = 99
|
|
177
|
+
otros_clave_rastreo_existente = 100
|
|
178
|
+
otros_usuario_no_existe = 101
|
|
179
|
+
otros_causa_devolucion_invalida = 102
|
|
180
|
+
otros_causa_devolucion_requerida = 103
|
|
181
|
+
otros_fecha_operacion_fecha_invalida = 104
|
|
182
|
+
otros_fecha_operacion_hora_invalida = 105
|
|
183
|
+
otros_tipo_orden_requerido = 106
|
|
184
|
+
otros_tipo_orden_invalido = 107
|
|
185
|
+
otros_fecha_operacion_invalida = 108 # yyyyMMdd
|
|
186
|
+
otros_op_folio_invalido = 109 # -1
|
|
187
|
+
otros_op_folio_invalido_2 = 110 # -1
|
|
188
|
+
otros_fecha_operacion_incorrecta = 111 # debe ser la del sistema karpay
|
|
189
|
+
otros_cuenta_beneficiario_2_requerida = 112
|
|
190
|
+
otros_tipo_cuenta_beneficiario_2_requerida = 113
|
|
191
|
+
otros_devolucion_sin_correspondencia = 114
|
|
192
|
+
otros_tipo_pago_invalido = 115
|
|
193
|
+
otros_tipo_cuenta_celular_cuenta_ordenante_invalida = 116 # 10 digitos
|
|
194
|
+
otros_tipo_cuenta_celular_cuenta_beneficiario_invalida = 117 # 10 digitos
|
|
195
|
+
otros_cde_vacio = 118
|
|
196
|
+
otros_cde_requerido = 119
|
|
197
|
+
otros_usuario_autorizado_requerido_traspasos = 120
|
|
198
|
+
otros_tipo_pago_horario_invalido = 121
|
|
199
|
+
otros_tipo_pago_cuenta_beneficiario_invalido = 122
|
|
200
|
+
otros_operaciones_concluidas = 123
|
|
201
|
+
otros_tipo_cuenta_ordenante_requerido = 124
|
|
202
|
+
otros_tipo_cuenta_beneficiario_requerida = 125
|
|
203
|
+
otros_cuenta_beneficiario_2_invalida = 126
|
|
204
|
+
otros_tipo_de_pago_invalido = 127
|
|
205
|
+
otros_cuenta_clabe_invalida = 175
|
|
206
|
+
otros_usuario_no_pertenece_empresa = -20
|
|
207
|
+
otros_tipo_cuenta_ordenante_no_habilitado_habiles = -21
|
|
208
|
+
otros_tipo_cuenta_ordenante_no_habilitado_inhabiles = -22
|
|
209
|
+
otros_tipo_cuenta_ordenante_fuera_horario_habiles = -23
|
|
210
|
+
otros_tipo_cuenta_ordenante_fuera_horario_inhabiles = -24
|
|
211
|
+
otros_tipo_cuenta_beneficiario_no_habilitado_habiles = -25
|
|
212
|
+
otros_tipo_cuenta_beneficiario_no_habilitado_inhabiles = -26
|
|
213
|
+
otros_tipo_cuenta_beneficiario_fuera_horario_habiles = -27
|
|
214
|
+
otros_tipo_cuenta_beneficiario_fuera_horario_inhabiles = -28
|
|
215
|
+
otros_tipo_cuenta_beneficiario_2_no_habilitado_habiles = -29
|
|
216
|
+
otros_tipo_cuenta_beneficiario_2_no_habilitado_inhabiles = -30
|
|
217
|
+
otros_tipo_cuenta_beneficiario_2_fuera_horario_habiles = -31
|
|
218
|
+
otros_tipo_cuenta_beneficiario_2_fuera_horario_inhabiles = -32
|
|
219
|
+
otros_cuenta_ordenante_no_pertence_banxico = -33
|
|
220
|
+
otros_tipo_pago_invalido_coa_poa = -34
|
|
221
|
+
otros_institucion_no_certificada_poa = -35
|
|
222
|
+
otros_cuenta_ordenante_domicilio_requerido = 128
|
|
223
|
+
otros_cuenta_ordenante_domicilio_excede_longitud = 129
|
|
224
|
+
otros_cuenta_ordenante_domicilio_invalido = 130
|
|
225
|
+
otros_cuenta_ordenante_domicilio_vacio = 131
|
|
226
226
|
|
|
227
227
|
|
|
228
228
|
class CodigoPostalOrdenante(str, Enum):
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
codigo_postal_requerido = 132
|
|
230
|
+
codigo_postal_numerico = 133
|
|
231
|
+
codigo_postal_excede_longitud = 134
|
|
232
|
+
codigo_postal_vacio = 135
|
|
233
233
|
|
|
234
234
|
|
|
235
235
|
class FechaConstitucionOrdenante(str, Enum):
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
fecha_constitucion_requerido = 136
|
|
237
|
+
fecha_constitucion_excede_longitud = 137
|
|
238
|
+
fecha_constitucion_invalida = 138
|
|
239
239
|
|
|
240
240
|
|
|
241
241
|
class DevolucionExtemporaneaCodigoError(str, Enum):
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
242
|
+
devolucion_extemporanea_clave_rastreo_requerido = 400
|
|
243
|
+
devolucion_extemporanea_clave_rastreo_excede_longitud = 401
|
|
244
|
+
devolucion_extemporanea_clave_rastreo_invalida = 402
|
|
245
|
+
devolucion_extemporanea_folio_paquete_longitud_incorrecta = 403
|
|
246
|
+
devolucion_extemporanea_folio_paquete_numerico = 404
|
|
247
|
+
devolucion_extemporanea_folio_paquete_vacio = 405
|
|
248
|
+
devolucion_extemporanea_folio_pago_longitud_incorrecta = 406
|
|
249
|
+
devolucion_extemporanea_folio_pago_solo_numeros = 407
|
|
250
|
+
devolucion_extemporanea_folio_pago_vacio = 409
|
|
251
|
+
devolucion_extemporanea_fecha_operacion_original_requerida = 410
|
|
252
|
+
devolucion_extemporanea_fecha_operacion_original_longitud_incorrecta = 411
|
|
253
|
+
devolucion_extemporanea_interes_original_requerido = 412
|
|
254
|
+
devolucion_extemporanea_interes_original_longitud_incorrecta = 413
|
|
255
|
+
devolucion_extemporanea_interes_original_invalido = 414
|
|
256
|
+
devolucion_extemporanea_interes_original_no_permitido = 415
|
|
257
|
+
devolucion_extemporanea_monto_original_requerido = 416
|
|
258
|
+
devolucion_extemporanea_monto_original_longitud_incorrecta = 417
|
|
259
|
+
devolucion_extemporanea_monto_original_invalido = 418
|
|
260
|
+
devolucion_extemporanea_monto_original_no_permitido = 419
|
|
261
|
+
devolucion_extemporanea_clave_rastreo_hexadecimal_requerido = 420
|
|
262
|
+
devolucion_extemporanea_clave_rastreo_hexadecimal_longitud_incorrecta = 421
|
|
263
263
|
|
|
264
264
|
|
|
265
265
|
class ClasificacionOperacionCodigoError(str, Enum):
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
clasificacion_operacion_requerido = 139
|
|
267
|
+
clasificacion_operacion_excede_longitud = 140
|
|
268
|
+
clasificacion_operacion_solo_numerica = 141
|
|
269
|
+
clasificacion_operacion_invalido = 142
|
|
270
270
|
|
|
271
271
|
|
|
272
272
|
class DireccionIPCodigoError(str, Enum):
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
direccion_ip_requerido = 143
|
|
274
|
+
direccion_ip_excede_longitud = 144
|
|
275
|
+
direccion_ip_invalida = 145
|
|
276
276
|
|
|
277
277
|
|
|
278
278
|
class FechaInstruccionCodigoError(str, Enum):
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
fecha_instruccion_requerida = 146
|
|
280
|
+
fecha_instruccion_excede_longitud = 147
|
|
281
|
+
fecha_instruccion_invalido = 148
|
|
282
282
|
|
|
283
283
|
|
|
284
284
|
class HoraInstruccionCodigoError(str, Enum):
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
hora_instruccion_requerida = 149
|
|
286
|
+
hora_instruccion_excede_longitud = 150
|
|
287
|
+
hora_instruccion_invalido = 151
|
|
288
288
|
|
|
289
289
|
|
|
290
290
|
class FechaAceptacionCodigoError(str, Enum):
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
291
|
+
fecha_aceptacion_requerida = 152
|
|
292
|
+
fecha_aceptacion_excede_longitud = 153
|
|
293
|
+
fecha_aceptacion_invalido = 154
|
|
294
294
|
|
|
295
295
|
|
|
296
296
|
class HoraAceptacionCodigoError(str, Enum):
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
hora_aceptacion_requerida = 155
|
|
298
|
+
hora_aceptacion_excede_longitud = 156
|
|
299
|
+
hora_aceptacion_invalido = 157
|
|
300
300
|
|
|
301
301
|
|
|
302
302
|
class ClaveBancoUsuarioCodigoError(str, Enum):
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
clave_banco_usuario_requerida = 158
|
|
304
|
+
clave_banco_usuario_numerica = 159
|
|
305
|
+
clave_banco_usuario_excede_longitud = 160
|
|
306
|
+
clave_banco_usuario_solo_ceros = 161
|
|
307
307
|
|
|
308
308
|
|
|
309
309
|
class TipoCuentaBancoUsuarioCodigoError(str, Enum):
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
tipo_cuenta_banco_usuario_requerido = 162
|
|
311
|
+
tipo_cuenta_banco_usuario_invalida = 163
|
|
312
312
|
|
|
313
313
|
|
|
314
314
|
class BancoUsuarioCodigoError(str, Enum):
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
315
|
+
banco_usuario_requerido = 164
|
|
316
|
+
banco_usuario_numerica = 165
|
|
317
|
+
banco_usuario_excede_longitud = 166
|
|
318
|
+
banco_usuario_solo_ceros = 167
|
|
319
|
+
banco_usuario_tipo_cuenta_clabe_invalida = 168
|
|
320
|
+
banco_usuario_tipo_cuenta_tarjeta_invalida = 169
|
|
321
|
+
banco_usuario_primeros_digitos_incorrectos = 172 # [1,2]
|
|
322
|
+
banco_usuario_fiel_invalida = 173
|
|
323
|
+
banco_usuario_cuenta_inexistente = 174
|
|
324
|
+
# no pertenece al participante
|
|
325
|
+
banco_usuario_tipo_cuenta_clabe_cuenta_ordenante_incorrecta = 422
|
|
326
|
+
banco_usuario_digito_verificador_incorrecto = 423
|
|
327
|
+
# no coincide monto menos el interes
|
|
328
|
+
banco_usuario_monto_original_incorrecto = 424
|
|
327
329
|
# no es posible una devolucion de una devolucion extratemporanea noqa:E501
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
330
|
+
banco_usuario_devolucion_extratemporanea_no_permitida = 425
|
|
331
|
+
banco_usuario_devolucion_extratemporanea_fecha_incorrecta = 426
|
|
332
|
+
# no es posible una devolucion de una devolucion
|
|
333
|
+
banco_usuario_devolucion_no_permitida = 427
|
|
331
334
|
|
|
332
335
|
|
|
333
336
|
class PagoFacturaCodigoError(str, Enum):
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
337
|
+
pago_factura_requerido = 428
|
|
338
|
+
pago_factura_excede_longitud = 429
|
|
339
|
+
pago_factura_invalida = 430
|
|
340
|
+
pago_factura_incorrecto = 431
|
|
341
|
+
pago_factura_faltan_datos = 432
|
|
342
|
+
pago_factura_uuid_invalido = 433
|
|
343
|
+
pago_factura_importe_invalido = 434
|
|
344
|
+
pago_factura_excede_numero = 435
|
|
345
|
+
pago_factura_tipo_pago_invalido = 188
|
|
346
|
+
pago_factura_firma_invalida = 436
|
|
347
|
+
pago_factura_certificado_no_encontrado = 437
|
|
348
|
+
pago_factura_sistema_no_disponible = 441
|
|
349
|
+
pago_factura_listener_outgoing_no_habilitado = 500
|
|
347
350
|
|
|
348
351
|
|
|
349
352
|
class CoDiCodigoError(str, Enum):
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
353
|
+
codi_certificado_invalido = 442
|
|
354
|
+
codi_certificado_requerido = 443
|
|
355
|
+
codi_certificado_excede_longitud = 444
|
|
356
|
+
codi_folio_codi_requerido = 445
|
|
357
|
+
codi_folio_codi_invalido = 446
|
|
358
|
+
codi_folio_codi_excede_longitud = 447
|
|
359
|
+
codi_pago_comision_requerido = 448
|
|
360
|
+
codi_pago_comision_invalido = 449
|
|
361
|
+
codi_pago_comision_numero = 450
|
|
362
|
+
codi_monto_comision_requerido = 451
|
|
363
|
+
codi_monto_comision_invalido = 452
|
|
364
|
+
codi_telefono_ordenante_numerico = 453
|
|
365
|
+
codi_telefono_ordenante_requerido = 454
|
|
366
|
+
codi_telefono_ordenante_invalido = 455
|
|
367
|
+
codi_telefono_ordenante_excede_longitud = 456
|
|
368
|
+
codi_digito_verificador_ordenante_numerico = 457
|
|
369
|
+
codi_digito_verificador_ordenante_requerido = 458
|
|
370
|
+
codi_digito_verificador_ordenante_invalido = 459
|
|
371
|
+
codi_digito_verificador_ordenante_excede_longitud = 460
|
|
372
|
+
codi_telefono_beneficiario_numerico = 461
|
|
373
|
+
codi_telefono_beneficiario_requerido = 462
|
|
374
|
+
codi_telefono_beneficiario_invalido = 463
|
|
375
|
+
codi_telefono_beneficiario_excede_longitud = 464
|
|
376
|
+
codi_digito_verificador_beneficiario_numerico = 465
|
|
377
|
+
codi_digito_verificador_beneficiario_requerido = 466
|
|
378
|
+
codi_digito_verificador_beneficiario_invalido = 467
|
|
379
|
+
codi_digito_verificador_beneficiario_excede_longitud = 468
|
|
380
|
+
codi_digito_verificador_comercio_alfanumerico = 469
|
|
381
|
+
codi_digito_verificador_comercio_requerido = 470
|
|
382
|
+
codi_digito_verificador_comercio_excede_longitud = 471
|
|
380
383
|
|
|
381
384
|
|
|
382
385
|
class DevolucionAcreditadaCodigoError(str, Enum):
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
386
|
+
devolucion_acreditada_no_encontrada = 472
|
|
387
|
+
devolucion_acreditada_devolucion_no_permitida = 473
|
|
388
|
+
devolucion_acreditada_institucion_incorrecta = 474
|
|
389
|
+
devolucion_acreditada_orden_no_liquidada = 475
|
|
390
|
+
# es la misma que la fecha de operación actual
|
|
391
|
+
devolucion_acreditada_fecha_operacion_incorrecta = 476
|
|
392
|
+
devolucion_acreditada_abono_no_encontrado = 477
|
|
393
|
+
devolucion_acreditada_no_permitida = 478
|
|
394
|
+
devolucion_acreditada_ya_devuelta = 479
|
|
395
|
+
devolucion_acreditada_orden_no_liquidada_banxico = 480
|
|
392
396
|
# no puede ser mayor al de la orden original
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
397
|
+
devolucion_acreditada_devolucion_tipo_pago_codi_monto_incorrecto = 481
|
|
398
|
+
# no puede ser superior al original
|
|
399
|
+
devolucion_acreditada_monto_superior_original = 482
|
|
400
|
+
devolucion_acreditada_monto_incorrecto = 483
|
|
396
401
|
|
|
397
402
|
|
|
398
403
|
ERROR_CODES = (
|
spei/resources/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
from spei.resources.orden import Orden # noqa: F401
|
|
1
|
+
from spei.resources.orden import Orden, TerceroATerceroOrdenPago # noqa: F401
|
|
2
2
|
from spei.resources.respuesta import Respuesta # noqa: F401
|
spei/resources/orden.py
CHANGED
|
@@ -16,7 +16,7 @@ class Orden(BaseModel):
|
|
|
16
16
|
|
|
17
17
|
op_fecha_oper: int
|
|
18
18
|
op_folio: str
|
|
19
|
-
op_ins_clave: digits(
|
|
19
|
+
op_ins_clave: digits(3, 5)
|
|
20
20
|
op_monto: str
|
|
21
21
|
op_tp_clave: types.TipoPagoOrdenPago
|
|
22
22
|
op_cve_rastreo: str
|
|
@@ -24,8 +24,9 @@ class Orden(BaseModel):
|
|
|
24
24
|
op_tipo_orden: types.TipoOrdenPago
|
|
25
25
|
op_prioridad: types.PrioridadOrdenPago
|
|
26
26
|
op_me_clave: types.MedioEntregaOrdenPago
|
|
27
|
-
op_topologia:
|
|
27
|
+
op_topologia: types.TopologiaOrdenPago = types.TopologiaOrdenPago.notify_on_payment_settlement # noqa: E501
|
|
28
28
|
op_usu_clave: str
|
|
29
|
+
op_fecha_cap: int = None
|
|
29
30
|
|
|
30
31
|
op_firma_dig: str = None
|
|
31
32
|
|
|
@@ -42,6 +43,7 @@ class Orden(BaseModel):
|
|
|
42
43
|
|
|
43
44
|
op_iva: float = None
|
|
44
45
|
op_ref_numerica: str = None
|
|
46
|
+
op_ref_cobranza: str = None
|
|
45
47
|
|
|
46
48
|
op_nom_ben_2: str = None
|
|
47
49
|
op_tc_clave_ben_2: int = None
|
|
@@ -53,7 +55,40 @@ class Orden(BaseModel):
|
|
|
53
55
|
op_concepto_pag_2: str = None
|
|
54
56
|
op_ref_cobranza: str = None
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
op_to_clave: types.TipoPagoOrdenPago = None
|
|
59
|
+
op_cd_clave: types.TipoDevolucionOrdenPago = None
|
|
60
|
+
|
|
61
|
+
op_folio_servidor: int = None
|
|
62
|
+
op_usu_autoriza: str = None
|
|
63
|
+
op_err_clave: types.CodigoError = None
|
|
64
|
+
op_razon_rechazo: str = None
|
|
65
|
+
op_hora_cap: int = None
|
|
66
|
+
op_hora_liq_bm: int = None
|
|
67
|
+
op_hora_liq_sist: int = None
|
|
68
|
+
op_cde: str = None
|
|
69
|
+
op_cuenta_dev: str = None
|
|
70
|
+
op_hora_lecturaHost: int = None # noqa: N815
|
|
71
|
+
op_hora_insercion: int = None
|
|
72
|
+
hr_deposito_acuse_banxico: int = None
|
|
73
|
+
paq_folio: int = None
|
|
74
|
+
ah_ar_clave: int = None
|
|
75
|
+
emp_clave: int = None
|
|
76
|
+
paq_folio_ori: int = None
|
|
77
|
+
op_folio_ori: int = None
|
|
78
|
+
op_rastreo_ori: str = None
|
|
79
|
+
op_monto_intereses: float = None
|
|
80
|
+
op_info_factura: str = None
|
|
81
|
+
op_indica_ben_rec: str = None
|
|
82
|
+
|
|
83
|
+
op_num_cel_ord: int = None
|
|
84
|
+
op_digito_ver_ord: int = None
|
|
85
|
+
op_num_cel_ben: int = None
|
|
86
|
+
op_digito_ver_ben: int = None
|
|
87
|
+
op_folio_codi: str = None
|
|
88
|
+
op_comision_trans: int = None
|
|
89
|
+
op_monto_comision: float = None
|
|
90
|
+
op_cert_comer_env: int = None
|
|
91
|
+
op_digito_ver_comer: int = None
|
|
57
92
|
|
|
58
93
|
class Config: # noqa: WPS306, WPS431
|
|
59
94
|
use_enum_values = True
|
|
@@ -101,3 +136,21 @@ class Orden(BaseModel):
|
|
|
101
136
|
orden_data[tag] = element.text
|
|
102
137
|
|
|
103
138
|
return cls(**orden_data)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class TerceroATerceroOrdenPago(Orden):
|
|
142
|
+
op_nom_ord: str
|
|
143
|
+
op_tc_clave_ord: types.TipoCuentaOrdenPago = types.TipoCuentaOrdenPago.clabe
|
|
144
|
+
op_cuenta_ord: str
|
|
145
|
+
op_rfc_curp_ord: str
|
|
146
|
+
op_ord_clave: types.ClaveOrdenanteOrdenPago = types.ClaveOrdenanteOrdenPago.AMU
|
|
147
|
+
|
|
148
|
+
op_nom_ben: str
|
|
149
|
+
op_tc_clave_ben: types.TipoCuentaOrdenPago
|
|
150
|
+
op_cuenta_ben: str
|
|
151
|
+
op_rfc_curp_ben: str = None
|
|
152
|
+
|
|
153
|
+
op_concepto_pag_2: str
|
|
154
|
+
op_iva: float = None
|
|
155
|
+
op_ref_numerica: str
|
|
156
|
+
op_ref_cobranza: str = None
|
spei/types.py
CHANGED
|
@@ -104,4 +104,13 @@ class MedioEntregaOrdenPago(str, Enum):
|
|
|
104
104
|
nomina = '18'
|
|
105
105
|
|
|
106
106
|
|
|
107
|
+
class TopologiaOrdenPago(str, Enum):
|
|
108
|
+
notify_on_payment_settlement = 'V'
|
|
109
|
+
notify_on_payment_instruction = 'T'
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class TipoDevolucionOrdenPago(str, Enum):
|
|
113
|
+
devolucion_no_acreditada = 0
|
|
114
|
+
|
|
115
|
+
|
|
107
116
|
CodigoError = generate_error_codes()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: spei-python
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.3
|
|
4
4
|
Summary:
|
|
5
5
|
Author: gonz
|
|
6
6
|
Author-email: gonzasestopal@gmail.com
|
|
@@ -30,6 +30,46 @@ Use the package manager [poetry](https://pypi.org/project/poetry/) to install.
|
|
|
30
30
|
|
|
31
31
|
poetry install spei-python
|
|
32
32
|
|
|
33
|
+
## Usage
|
|
34
|
+
Use our client to send orders to SPEI.
|
|
35
|
+
```python
|
|
36
|
+
from spei.client import BaseClient
|
|
37
|
+
|
|
38
|
+
client = BaseClient(
|
|
39
|
+
host='karpay-beta.intfondeadora.app',
|
|
40
|
+
username='karpay',
|
|
41
|
+
password='password',
|
|
42
|
+
priv_key='private_key',
|
|
43
|
+
priv_key_passphrase='passphrase',
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Methods
|
|
48
|
+
- [registra_orden](/spei/README.md)
|
|
49
|
+
|
|
50
|
+
## Resources
|
|
51
|
+
There are two main resources.
|
|
52
|
+
|
|
53
|
+
- [Orden](spei/resources/orden.py) our abstraction of order, this goes through SPEI as XML.
|
|
54
|
+
- [Respuesta](spei/resources/respuesta.py) our abstraction of received SPEI messages and response to SPEI orders.
|
|
55
|
+
|
|
56
|
+
## Types
|
|
57
|
+
- [TipoPagoOrdenPago](/spei/types.py#6) Order payment type.
|
|
58
|
+
- [TipoOrdenPago](/spei/types.py#33) Order type.
|
|
59
|
+
- [TipoCuentaOrdenPago](/spei/types.py#38) Account type.
|
|
60
|
+
- [PrioridadOrdenPago](/spei/types.py#58) Order priority.
|
|
61
|
+
- [CategoriaOrdenPago](/spei/types.py#63) Order Category.
|
|
62
|
+
- [EstadoOrdenPago](/spei/types.py#76) Order status.
|
|
63
|
+
- [ClaveOrdenanteOrdenPago](/spei/types.py#83) Root Institution Code.
|
|
64
|
+
- [FolioOrdenPago](/spei/types.py#87) Order invoice identifier.
|
|
65
|
+
- [MedioEntregaOrdenPago](/spei/types.py#91) Order transmission method.
|
|
66
|
+
- [TopologiaOrdenPago](/spei/types.py#107) Order notification method.
|
|
67
|
+
|
|
68
|
+
## Errors
|
|
69
|
+
You may use any of the generic errors in [errors](/spei/errors.py) to return as response to SPEI. (?) Need to ask karpay.
|
|
70
|
+
|
|
71
|
+
These errors are included inside respuesta.
|
|
72
|
+
|
|
33
73
|
## Test
|
|
34
74
|
Tested with [mamba](https://mamba-framework.readthedocs.io/en/latest/), install poetry dev packages and then run tests.
|
|
35
75
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
spei/README.md,sha256=VWu0kLDrzj9EPLbJK9Rzde4uYMedzaqNwRoccowphmY,5569
|
|
1
2
|
spei/__init__.py,sha256=UmjWrUFyb4o1Qmg7LZHdzPe05J1rwApDVYcrOelBEYo,49
|
|
2
3
|
spei/client.py,sha256=W6euigkL_4ED1nlzC5Y9_LVhkWq7b2R5ACuiwR7Gpps,1956
|
|
3
|
-
spei/errors.py,sha256=
|
|
4
|
+
spei/errors.py,sha256=ne3Qg5ciRo_4TkiR4xJOSK7WQ-teeG6I9-dxqykUH-0,16065
|
|
4
5
|
spei/requests/__init__.py,sha256=2EkzdNBsZJo3T5UFlHWUBeS9t8QGiV7Fj1usX-qR-pQ,126
|
|
5
6
|
spei/requests/orden.py,sha256=OCKTRhOToLCNfXlEnevMCJAIA6mRYXDSUBOvRFfjuSA,1168
|
|
6
7
|
spei/requests/respuesta.py,sha256=vCWinkOkZ81hG3ZGrGtvrlPqfv0_-zT0Yabe4XGmuIk,1068
|
|
7
|
-
spei/resources/__init__.py,sha256=
|
|
8
|
-
spei/resources/orden.py,sha256=
|
|
8
|
+
spei/resources/__init__.py,sha256=AeRmATIr6U4n4sUfXkzsr9bJRH01MimItG4P0HavR2M,140
|
|
9
|
+
spei/resources/orden.py,sha256=a6OMw5IMZr63_N2NglXrFNVK1WfNG_DbDsJmKaaOvHA,5079
|
|
9
10
|
spei/resources/respuesta.py,sha256=IhibT54tTG1hdG3TE8HmTz9whLVLhhGgDjeg9Eqx0x0,1698
|
|
10
|
-
spei/types.py,sha256=
|
|
11
|
+
spei/types.py,sha256=MPeH3U1lzQSDDwGymvh2gdBD4FHCy3HUI9sQb-R8xQs,2992
|
|
11
12
|
spei/utils.py,sha256=bkicw5-QpygAKqTu3RCtHQ0Aal8HcUVyc8x7dvxg2JY,2272
|
|
12
13
|
spei/validators.py,sha256=1b-brOmNesdiUi2X0LV0-Km4Sh6RGNeKNeAxshQXtOs,742
|
|
13
|
-
spei_python-0.12.
|
|
14
|
-
spei_python-0.12.
|
|
15
|
-
spei_python-0.12.
|
|
14
|
+
spei_python-0.12.3.dist-info/METADATA,sha256=EvZ-XmIvzvDW6kGhggws8vmVdBDYH2BNOf1sn9wflmo,3020
|
|
15
|
+
spei_python-0.12.3.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
16
|
+
spei_python-0.12.3.dist-info/RECORD,,
|
|
File without changes
|