formatos-febraban 0.3.58 → 0.3.59
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a56a4b00054bcf6de88c2eea7758307827b059e
|
4
|
+
data.tar.gz: c179969d586349c1880c02a1fdff47a5ca91d0a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d188b9a26f8526a11c677b654e851a728a20a019816dd08e83e73ccbd9bcb457ff6d0bba183965717e111197fbb4983c79f13dc7bab5b83b50062d992b7e0d6a
|
7
|
+
data.tar.gz: 1ef19a2664794199276f634d990f8b4dd21c372ae745f41a568b6d8bc0e07b41e60c217f2d9f7428044ff6e00b4db93548fa4be216b81f3852aa78d9d6b4bd0e
|
data/lib/formatos/cielo/cielo.rb
CHANGED
@@ -118,6 +118,21 @@ class CieloDetalhe < FormatSection
|
|
118
118
|
self.get_section_value(22)
|
119
119
|
end
|
120
120
|
|
121
|
+
def success?
|
122
|
+
self.get_codigo_retorno == '00'
|
123
|
+
end
|
124
|
+
|
125
|
+
def soft_bounce?
|
126
|
+
codes = ["04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "20", "21",
|
127
|
+
"22", "23", "54", "77", "81", "88", "95", "99"]
|
128
|
+
|
129
|
+
!self.success? && codes.include?(self.get_codigo_retorno)
|
130
|
+
end
|
131
|
+
|
132
|
+
def hard_bounce?
|
133
|
+
!self.success? && !self.soft_bounce?
|
134
|
+
end
|
135
|
+
|
121
136
|
def get_mensagem_retorno
|
122
137
|
case self.get_status_venda
|
123
138
|
when "00"
|
@@ -155,11 +170,9 @@ class CieloDetalhe < FormatSection
|
|
155
170
|
when "16"
|
156
171
|
"Transação original não localizada (para cancelamento)"
|
157
172
|
when "17"
|
158
|
-
"Nº de itens informados no RO não
|
173
|
+
"Nº de itens informados no RO não compatível com os CV’s"
|
159
174
|
when "18"
|
160
175
|
"Número de referência inválido"
|
161
|
-
when "54"
|
162
|
-
"Não é permitido cancelamento parcial de um plano parcelado que está sendo contestado pelo portador."
|
163
176
|
when "20"
|
164
177
|
"Cancelamento para parcelado de transação já cancelada"
|
165
178
|
when "21"
|
@@ -170,6 +183,8 @@ class CieloDetalhe < FormatSection
|
|
170
183
|
"Número do RO original inválido (registro I2)"
|
171
184
|
when "42"
|
172
185
|
"Cartão cancelado"
|
186
|
+
when "54"
|
187
|
+
"Não é permitido cancelamento parcial de um plano parcelado que está sendo contestado pelo portador."
|
173
188
|
when "56"
|
174
189
|
"Tipo de plano de cartão inválido"
|
175
190
|
when "59"
|
@@ -7,34 +7,34 @@ module VAldeias
|
|
7
7
|
|
8
8
|
def initialize
|
9
9
|
@section = Section.new({
|
10
|
-
0 => Position.new(1, 1, false, "1", true),
|
11
|
-
1 => Position.new(2, 5, false),
|
12
|
-
2 => Position.new(3, 3, true, "0"),
|
13
|
-
3 => Position.new(4, 7, false),
|
14
|
-
4 => Position.new(5, 1, false),
|
15
|
-
5 => Position.new(6, 2, false),
|
16
|
-
6 => Position.new(7, 3, true, "0"),
|
17
|
-
7 => Position.new(8, 12, false),
|
18
|
-
8 => Position.new(9, 4, true, "0"),
|
19
|
-
9 => Position.new(10, 11, true),
|
20
|
-
10 => Position.new(11, 4, true, "0"),
|
21
|
-
11 => Position.new(12, 6, true),
|
22
|
-
12 => Position.new(13, 4, true, "0"),
|
23
|
-
13 => Position.new(14, 6, true),
|
24
|
-
14 => Position.new(15, 40, false),
|
25
|
-
15 => Position.new(16, 60, false),
|
26
|
-
16 => Position.new(17, 10, false),
|
27
|
-
17 => Position.new(18, 10, false),
|
28
|
-
18 => Position.new(19, 30, false),
|
29
|
-
19 => Position.new(20, 30, false),
|
30
|
-
20 => Position.new(21, 2, false),
|
31
|
-
21 => Position.new(22, 8, false),
|
32
|
-
22 => Position.new(23, 15, false),
|
33
|
-
23 => Position.new(24, 44, false),
|
34
|
-
24 => Position.new(25, 4, true, "0"),
|
35
|
-
25 => Position.new(26, 56, false),
|
36
|
-
26 => Position.new(27, 14, false),
|
37
|
-
27 => Position.new(44, 6, true)
|
10
|
+
0 => Position.new(1, 1, false, "1", true), # Código do Registro
|
11
|
+
1 => Position.new(2, 5, false), # Agencia de Débito
|
12
|
+
2 => Position.new(3, 3, true, "0"), # Zeros
|
13
|
+
3 => Position.new(4, 7, false), # Conta Corrente
|
14
|
+
4 => Position.new(5, 1, false), # Digito da CC
|
15
|
+
5 => Position.new(6, 2, false), # Carteira
|
16
|
+
6 => Position.new(7, 3, true, "0"), # Zeros
|
17
|
+
7 => Position.new(8, 12, false), # Nosso numero
|
18
|
+
8 => Position.new(9, 4, true, "0"), # Zeros
|
19
|
+
9 => Position.new(10, 11, true), # Numero Documento
|
20
|
+
10 => Position.new(11, 4, true, "0"), # Zeros
|
21
|
+
11 => Position.new(12, 6, true), # Data do documento
|
22
|
+
12 => Position.new(13, 4, true, "0"), # Zeros
|
23
|
+
13 => Position.new(14, 6, true), # Data de vencimento
|
24
|
+
14 => Position.new(15, 40, false), # Nome do sacado
|
25
|
+
15 => Position.new(16, 60, false), # Endereço
|
26
|
+
16 => Position.new(17, 10, false), # Numero
|
27
|
+
17 => Position.new(18, 10, false), # Complemento
|
28
|
+
18 => Position.new(19, 30, false), # Bairro
|
29
|
+
19 => Position.new(20, 30, false), # Cidade
|
30
|
+
20 => Position.new(21, 2, false), # Estado
|
31
|
+
21 => Position.new(22, 8, false), # Cep
|
32
|
+
22 => Position.new(23, 15, false), # Valor do titulo
|
33
|
+
23 => Position.new(24, 44, false), # Código de barras
|
34
|
+
24 => Position.new(25, 4, true, "0"), # Zeros
|
35
|
+
25 => Position.new(26, 56, false), # Linha digitavel
|
36
|
+
26 => Position.new(27, 14, false), # Brancos
|
37
|
+
27 => Position.new(44, 6, true) # Numero sequencial
|
38
38
|
})
|
39
39
|
end
|
40
40
|
|
@@ -56,7 +56,7 @@ module VAldeias
|
|
56
56
|
set_estado params[:estado]
|
57
57
|
set_cep params[:cep]
|
58
58
|
set_valor_titulo params[:valor]
|
59
|
-
set_codigo_barras params[:codigo_barras]
|
59
|
+
set_codigo_barras params[:codigo_barras]
|
60
60
|
set_linha_digitavel params[:linha_digitavel]
|
61
61
|
set_branco
|
62
62
|
set_sequencial params[:sequencial]
|
@@ -70,49 +70,49 @@ module VAldeias
|
|
70
70
|
|
71
71
|
def initialize
|
72
72
|
@section = Section.new({
|
73
|
-
0 => Position.new(1, 1, false, "1", true),
|
74
|
-
1 => Position.new(2, 2, true),
|
75
|
-
2 => Position.new(3, 14, false),
|
76
|
-
3 => Position.new(4, 3, false),
|
77
|
-
4 => Position.new(5, 17, true),
|
78
|
-
5 => Position.new(6, 25, false),
|
79
|
-
6 => Position.new(7, 8, false),
|
80
|
-
7 => Position.new(8, 12, true),
|
81
|
-
8 => Position.new(9, 10, false),
|
82
|
-
9 => Position.new(10, 12, false),
|
83
|
-
10 => Position.new(11, 1, false),
|
84
|
-
11 => Position.new(12, 2, false),
|
85
|
-
12 => Position.new(13, 1, false),
|
86
|
-
13 => Position.new(14, 2, false),
|
87
|
-
14 => Position.new(15, 6, false),
|
88
|
-
15 => Position.new(16, 10, false),
|
89
|
-
16 => Position.new(17, 20, false),
|
90
|
-
17 => Position.new(18, 6, false),
|
91
|
-
18 => Position.new(19, 13, false),
|
92
|
-
19 => Position.new(20, 3, false),
|
93
|
-
20 => Position.new(21, 5, false),
|
94
|
-
21 => Position.new(22, 2, false),
|
95
|
-
22 => Position.new(23, 13, false),
|
96
|
-
23 => Position.new(24, 13, false),
|
97
|
-
24 => Position.new(25, 13, false),
|
98
|
-
25 => Position.new(26, 13, false),
|
99
|
-
26 => Position.new(27, 13, false),
|
100
|
-
27 => Position.new(28, 13, false),
|
101
|
-
28 => Position.new(29, 13, false),
|
102
|
-
29 => Position.new(30, 13, false),
|
103
|
-
30 => Position.new(31, 13, false),
|
104
|
-
31 => Position.new(32, 2, false),
|
105
|
-
32 => Position.new(33, 1, false),
|
106
|
-
33 => Position.new(34, 6, false),
|
107
|
-
34 => Position.new(35, 3, false),
|
108
|
-
35 => Position.new(36, 10, false),
|
109
|
-
36 => Position.new(37, 4, false),
|
110
|
-
37 => Position.new(38, 10, false),
|
111
|
-
38 => Position.new(39, 40, false),
|
112
|
-
39 => Position.new(40, 2, false),
|
113
|
-
40 => Position.new(41, 10, false),
|
114
|
-
41 => Position.new(42, 14, false),
|
115
|
-
42 => Position.new(43, 6, false)
|
73
|
+
0 => Position.new(1, 1, false, "1", true), # Código do Registro
|
74
|
+
1 => Position.new(2, 2, true), # Tipo de inscrição da empresa (01:CPF, 02: CNPJ)
|
75
|
+
2 => Position.new(3, 14, false), # Numero da inscricao da empresa
|
76
|
+
3 => Position.new(4, 3, false), # Reservado - Zeros
|
77
|
+
4 => Position.new(5, 17, true), # Identificação da empresa (zero, carteira, agencia e CC )
|
78
|
+
5 => Position.new(6, 25, false), # Numero controle do participante
|
79
|
+
6 => Position.new(7, 8, false), # Reservado - Zeros
|
80
|
+
7 => Position.new(8, 12, true), # Identificação do titulo no banco
|
81
|
+
8 => Position.new(9, 10, false), # Reservado - Zeros
|
82
|
+
9 => Position.new(10, 12, false), # Reservado - Zeros
|
83
|
+
10 => Position.new(11, 1, false), # Indicador Rateio
|
84
|
+
11 => Position.new(12, 2, false), # Reservado - Zeros
|
85
|
+
12 => Position.new(13, 1, false), # Carteira
|
86
|
+
13 => Position.new(14, 2, false), # Id da Ocorrencia
|
87
|
+
14 => Position.new(15, 6, false), # Data da Ocorrencia
|
88
|
+
15 => Position.new(16, 10, false), # Numero Documento
|
89
|
+
16 => Position.new(17, 20, false), # Id do titulo no banco
|
90
|
+
17 => Position.new(18, 6, false), # Data vencimento do titulo (DDMMAA)
|
91
|
+
18 => Position.new(19, 13, false), # Valor do titulo
|
92
|
+
19 => Position.new(20, 3, false), # Banco cobrador
|
93
|
+
20 => Position.new(21, 5, false), # Agencia Cobradora
|
94
|
+
21 => Position.new(22, 2, false), # Especie de titulo - branco
|
95
|
+
22 => Position.new(23, 13, false), # Valor despesa das ocorrencias
|
96
|
+
23 => Position.new(24, 13, false), # Outras despesas
|
97
|
+
24 => Position.new(25, 13, false), # Juros operação em atraso
|
98
|
+
25 => Position.new(26, 13, false), # IOF devido
|
99
|
+
26 => Position.new(27, 13, false), # Valor abatimento
|
100
|
+
27 => Position.new(28, 13, false), # Valor desconto concedido
|
101
|
+
28 => Position.new(29, 13, false), # Valor pago
|
102
|
+
29 => Position.new(30, 13, false), # Juros de mora
|
103
|
+
30 => Position.new(31, 13, false), # Outros creditos
|
104
|
+
31 => Position.new(32, 2, false), # Reservado - branco
|
105
|
+
32 => Position.new(33, 1, false), # Motivo do codigo de ocorrencia
|
106
|
+
33 => Position.new(34, 6, false), # Data do credito
|
107
|
+
34 => Position.new(35, 3, false), # Origem pagamento
|
108
|
+
35 => Position.new(36, 10, false), # Reservado - brancos
|
109
|
+
36 => Position.new(37, 4, false), # Codigo do banco - quando cheque
|
110
|
+
37 => Position.new(38, 10, false), # Motivo das rejeicoes
|
111
|
+
38 => Position.new(39, 40, false), # Reservado - brancos
|
112
|
+
39 => Position.new(40, 2, false), # numero do cartorio
|
113
|
+
40 => Position.new(41, 10, false), # numero do protocolo
|
114
|
+
41 => Position.new(42, 14, false), # Reservado - brancos
|
115
|
+
42 => Position.new(43, 6, false) # Numero sequencial
|
116
116
|
})
|
117
117
|
end
|
118
118
|
|
@@ -182,6 +182,19 @@ class Febraban150F < FormatSection
|
|
182
182
|
end
|
183
183
|
end
|
184
184
|
|
185
|
+
def success?
|
186
|
+
self.get_codigo_retorno == 0
|
187
|
+
end
|
188
|
+
|
189
|
+
def soft_bounce?
|
190
|
+
codes = [1, 5, 18, 31]
|
191
|
+
!self.success? && codes.include?(self.get_codigo_retorno)
|
192
|
+
end
|
193
|
+
|
194
|
+
def hard_bounce?
|
195
|
+
!self.success? && !self.soft_bounce?
|
196
|
+
end
|
197
|
+
|
185
198
|
def get_mensagem_retorno
|
186
199
|
case self.get_codigo_retorno
|
187
200
|
when 0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formatos-febraban
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.59
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Ricardo Almeida
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|