cieloz 0.0.2
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.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +170 -0
- data/Rakefile +16 -0
- data/cieloz.gemspec +34 -0
- data/config/locales/en.yml +11 -0
- data/config/locales/pt-BR.yml +11 -0
- data/lib/cieloz/bandeiras.rb +22 -0
- data/lib/cieloz/builder.rb +71 -0
- data/lib/cieloz/configuracao.rb +64 -0
- data/lib/cieloz/helpers.rb +35 -0
- data/lib/cieloz/homologacao.rb +16 -0
- data/lib/cieloz/requisicao/dados_ec.rb +14 -0
- data/lib/cieloz/requisicao/resposta/erro.rb +11 -0
- data/lib/cieloz/requisicao/resposta/transacao.rb +11 -0
- data/lib/cieloz/requisicao/resposta.rb +35 -0
- data/lib/cieloz/requisicao.rb +69 -0
- data/lib/cieloz/requisicao_tid.rb +23 -0
- data/lib/cieloz/requisicao_transacao/dados_pedido.rb +32 -0
- data/lib/cieloz/requisicao_transacao/dados_portador.rb +79 -0
- data/lib/cieloz/requisicao_transacao/forma_pagamento.rb +94 -0
- data/lib/cieloz/requisicao_transacao.rb +126 -0
- data/lib/cieloz/version.rb +3 -0
- data/lib/cieloz.rb +24 -0
- data/readme/cielo_developer_guide_2.0.3.pdf +0 -0
- data/readme/cielo_guia_seguranca_ecommerce.pdf +0 -0
- data/readme/cielo_payment_states.png +0 -0
- data/readme/contrato_de_afiliacao_ao_sistema_cielo.pdf +0 -0
- data/readme/credentials.png +0 -0
- data/readme/dicas_preventivas_para_vendas_mais_seguras.pdf +0 -0
- data/readme/email_cielo.pdf +0 -0
- data/readme/lista_de_documentos_necessarios_para_afiliacao_de_vendas_pela_internet_pessoa_juridica.pdf +0 -0
- data/readme/mastercard_securecodedemo.swf +0 -0
- data/readme/supported_products.png +0 -0
- data/readme/termo_de_adesao_de_risco.pdf +0 -0
- data/readme/verified_by_visa.png +0 -0
- data/test/integration/integration_test.rb +104 -0
- data/test/minitest_helper.rb +65 -0
- data/test/unit/bandeiras_operacoes_test.rb +25 -0
- data/test/unit/builder_test.rb +212 -0
- data/test/unit/configuracao_test.rb +85 -0
- data/test/unit/requisicao_autorizacao_tid_test.rb +19 -0
- data/test/unit/requisicao_cancelamento_test.rb +25 -0
- data/test/unit/requisicao_captura_test.rb +25 -0
- data/test/unit/requisicao_consulta_test.rb +19 -0
- data/test/unit/requisicao_test.rb +84 -0
- data/test/unit/requisicao_transacao_test.rb +82 -0
- data/test/unit/validations_test.rb +358 -0
- data/test/unit/xml/dados-ec.xml +4 -0
- data/test/unit/xml/dados-pagamento.xml +5 -0
- data/test/unit/xml/dados-pedido.xml +9 -0
- data/test/unit/xml/dados-portador.xml +7 -0
- data/test/unit/xml/dados-simple_attrs.xml +4 -0
- data/test/unit/xml/erro.xml +5 -0
- data/test/unit/xml/transacao.xml +19 -0
- metadata +280 -0
@@ -0,0 +1,358 @@
|
|
1
|
+
describe Cieloz::Requisicao::DadosEc do
|
2
|
+
it { must validate_presence_of :numero }
|
3
|
+
it { must validate_presence_of :chave }
|
4
|
+
|
5
|
+
it "is validated inside RequisicaoTransacao" do
|
6
|
+
txn = Cieloz::RequisicaoTransacao.new dados_ec: subject
|
7
|
+
refute txn.valid?
|
8
|
+
refute txn.errors[:dados_ec].empty?
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe Cieloz::RequisicaoTransacao::DadosPortador do
|
13
|
+
it { must ensure_length_of(:nome_portador).is_at_most(50) }
|
14
|
+
|
15
|
+
it { must validate_presence_of :numero }
|
16
|
+
it { must ensure_length_of(:numero).is_equal_to 16 }
|
17
|
+
it { must validate_numericality_of(:numero).only_integer }
|
18
|
+
|
19
|
+
it { must validate_presence_of :validade }
|
20
|
+
it { must ensure_length_of(:validade).is_equal_to 6 }
|
21
|
+
it { must validate_numericality_of(:validade).only_integer }
|
22
|
+
|
23
|
+
it { must ensure_length_of(:codigo_seguranca)
|
24
|
+
.is_at_least(3)
|
25
|
+
.is_at_most(4) }
|
26
|
+
it { must validate_numericality_of(:codigo_seguranca).only_integer }
|
27
|
+
|
28
|
+
def mm_values range
|
29
|
+
yyyy = 2013
|
30
|
+
range.map { |i| mm = '%02d' % (i % 100) ; "#{yyyy}#{mm}" }
|
31
|
+
end
|
32
|
+
|
33
|
+
it "validates validade as yyyymm" do
|
34
|
+
must allow_value(*mm_values(1..12)).for(:validade)
|
35
|
+
|
36
|
+
values = mm_values(13..100) << "199911"
|
37
|
+
wont allow_value(*values).for(:validade)
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "indicador and codigo_seguranca validation" do
|
41
|
+
let(:_) { subject.class }
|
42
|
+
let(:code) { 123 }
|
43
|
+
|
44
|
+
before do
|
45
|
+
subject.instance_variable_set :@codigo_seguranca, code
|
46
|
+
refute_nil subject.codigo_seguranca
|
47
|
+
end
|
48
|
+
|
49
|
+
it "sets indicador nao informado" do
|
50
|
+
subject.indicador_nao_informado!
|
51
|
+
assert_equal _::INDICADOR_NAO_INFORMADO, subject.indicador
|
52
|
+
assert_nil subject.codigo_seguranca
|
53
|
+
end
|
54
|
+
|
55
|
+
it "sets indicador when codigo_seguranca is set" do
|
56
|
+
subject.codigo_seguranca = code
|
57
|
+
assert_equal _::INDICADOR_INFORMADO, subject.indicador
|
58
|
+
assert_equal code, subject.codigo_seguranca
|
59
|
+
end
|
60
|
+
|
61
|
+
it "sets indicador ilegivel" do
|
62
|
+
subject.indicador_ilegivel!
|
63
|
+
assert_equal _::INDICADOR_ILEGIVEL, subject.indicador
|
64
|
+
assert_nil subject.codigo_seguranca
|
65
|
+
end
|
66
|
+
|
67
|
+
it "sets indicador inexistente" do
|
68
|
+
subject.indicador_inexistente!
|
69
|
+
assert_equal _::INDICADOR_INEXISTENTE, subject.indicador
|
70
|
+
assert_nil subject.codigo_seguranca
|
71
|
+
end
|
72
|
+
|
73
|
+
it "defaults to NAO_INFORMADO" do
|
74
|
+
subject = _.new
|
75
|
+
assert_equal _::INDICADOR_NAO_INFORMADO, subject.indicador
|
76
|
+
assert_nil subject.codigo_seguranca
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
it "is validated inside RequisicaoTransacao" do
|
81
|
+
Cieloz::Configuracao.store_mode!
|
82
|
+
txn = Cieloz::RequisicaoTransacao.new dados_portador: subject
|
83
|
+
refute txn.valid?
|
84
|
+
refute txn.errors[:dados_portador].empty?
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe Cieloz::RequisicaoTransacao::DadosPedido do
|
89
|
+
it { must validate_presence_of :numero }
|
90
|
+
it { must ensure_length_of(:numero)
|
91
|
+
.is_at_least(1)
|
92
|
+
.is_at_most(20) }
|
93
|
+
|
94
|
+
it { must validate_presence_of :valor }
|
95
|
+
it { must validate_numericality_of(:valor).only_integer }
|
96
|
+
it { must ensure_length_of(:valor)
|
97
|
+
.is_at_least(1)
|
98
|
+
.is_at_most(12) }
|
99
|
+
|
100
|
+
it { must validate_presence_of :moeda }
|
101
|
+
it { must validate_presence_of :data_hora }
|
102
|
+
|
103
|
+
it { must ensure_length_of(:descricao).is_at_most(1024) }
|
104
|
+
it { must ensure_length_of(:soft_descriptor).is_at_most(13) }
|
105
|
+
|
106
|
+
it { must ensure_inclusion_of(:idioma).in_array(subject.class::IDIOMAS) }
|
107
|
+
|
108
|
+
it "is validated inside RequisicaoTransacao" do
|
109
|
+
txn = Cieloz::RequisicaoTransacao.new dados_pedido: subject
|
110
|
+
refute txn.valid?
|
111
|
+
refute txn.errors[:dados_pedido].empty?
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
describe Cieloz::RequisicaoTransacao::FormaPagamento do
|
116
|
+
let(:all_flags) { Cieloz::Bandeiras::ALL }
|
117
|
+
|
118
|
+
describe "debito validation" do
|
119
|
+
let(:supported_flags) { subject.class::BANDEIRAS_DEBITO }
|
120
|
+
|
121
|
+
it "validates bandeira is VISA or MASTERCARD" do
|
122
|
+
supported_flags.each { |flag|
|
123
|
+
subject.debito flag
|
124
|
+
must ensure_inclusion_of(:bandeira).in_array(supported_flags)
|
125
|
+
}
|
126
|
+
end
|
127
|
+
|
128
|
+
it "accepts payment for VISA and MASTERCARD" do
|
129
|
+
supported_flags.each { |flag|
|
130
|
+
subject.debito flag
|
131
|
+
assert_equal subject.class::DEBITO, subject.produto
|
132
|
+
assert_equal flag, subject.bandeira
|
133
|
+
assert_equal 1, subject.parcelas
|
134
|
+
}
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
it "validates bandeiras for credito" do
|
139
|
+
all_flags.each { |flag|
|
140
|
+
subject.credito flag
|
141
|
+
must ensure_inclusion_of(:bandeira).in_array(all_flags)
|
142
|
+
}
|
143
|
+
end
|
144
|
+
|
145
|
+
it "accepts payment for credito" do
|
146
|
+
all_flags.each { |flag|
|
147
|
+
subject.credito flag
|
148
|
+
assert_equal subject.class::CREDITO, subject.produto
|
149
|
+
assert_equal flag, subject.bandeira
|
150
|
+
assert_equal 1, subject.parcelas
|
151
|
+
}
|
152
|
+
end
|
153
|
+
|
154
|
+
describe "validates parcelamento" do
|
155
|
+
it "is not supported by DISCOVER" do
|
156
|
+
supported_flags = subject.class::BANDEIRAS_PARCELAMENTO
|
157
|
+
|
158
|
+
subject.parcelado Cieloz::Bandeiras::DISCOVER, 2
|
159
|
+
must ensure_inclusion_of(:bandeira).in_array(supported_flags)
|
160
|
+
end
|
161
|
+
|
162
|
+
let(:flag) { all_flags.first }
|
163
|
+
let(:max_parcelas) { Cieloz::Configuracao.max_parcelas }
|
164
|
+
let(:max_adm_parcelas) { Cieloz::Configuracao.max_adm_parcelas }
|
165
|
+
|
166
|
+
it "converts 1 installment to CREDITO" do
|
167
|
+
pg = subject.parcelado flag, 1
|
168
|
+
assert_equal subject.class::CREDITO, pg.produto
|
169
|
+
end
|
170
|
+
|
171
|
+
it "creates a PARCELADO_LOJA payment till max_parcelas" do
|
172
|
+
(2..max_parcelas).each do |n|
|
173
|
+
pg = subject.parcelado flag, n
|
174
|
+
assert_equal subject.class::PARCELADO_LOJA, pg.produto
|
175
|
+
assert_equal flag, pg.bandeira
|
176
|
+
assert_equal n, pg.parcelas
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
it "creates a PARCELADO_ADM payment between max_installments and max_adm_installments" do
|
181
|
+
(max_parcelas+1..max_adm_parcelas).each do |n|
|
182
|
+
pg = subject.parcelado flag, n
|
183
|
+
assert_equal subject.class::PARCELADO_ADM, pg.produto
|
184
|
+
assert_equal flag, pg.bandeira
|
185
|
+
assert_equal n, pg.parcelas
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
it "validates parcelas in range 1..max_adm_parcelas" do
|
190
|
+
(1..max_adm_parcelas).each {|i|
|
191
|
+
assert subject.parcelado(flag, i).valid?, subject.errors.messages
|
192
|
+
}
|
193
|
+
(-10..0).each { |i|
|
194
|
+
refute subject.parcelado(flag, i).valid?, subject.errors.messages
|
195
|
+
}
|
196
|
+
(max_adm_parcelas+1..max_adm_parcelas+3).each { |i|
|
197
|
+
refute subject.parcelado(flag, i).valid?, subject.errors.messages
|
198
|
+
}
|
199
|
+
# refute not integers parcelas
|
200
|
+
refute subject.parcelado(flag, 1.234).valid?
|
201
|
+
refute subject.parcelado(flag, "abc").valid?
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
it "is validated inside RequisicaoTransacao" do
|
206
|
+
txn = Cieloz::RequisicaoTransacao.new forma_pagamento: subject
|
207
|
+
refute txn.valid?
|
208
|
+
refute txn.errors[:forma_pagamento].empty?
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
describe Cieloz::Requisicao do
|
213
|
+
it { must validate_presence_of :id }
|
214
|
+
it { must validate_presence_of :versao }
|
215
|
+
it { must validate_presence_of :dados_ec }
|
216
|
+
end
|
217
|
+
|
218
|
+
describe Cieloz::RequisicaoTransacao do
|
219
|
+
let(:_) { subject.class }
|
220
|
+
|
221
|
+
it { must validate_presence_of :dados_ec }
|
222
|
+
it { must validate_presence_of :dados_pedido }
|
223
|
+
it { must validate_presence_of :forma_pagamento }
|
224
|
+
|
225
|
+
it "somente autenticar requires url_retorno" do
|
226
|
+
subject.somente_autenticar
|
227
|
+
must validate_presence_of :url_retorno
|
228
|
+
end
|
229
|
+
|
230
|
+
it "autorizar somente autenticada requires url_retorno" do
|
231
|
+
subject.autorizar_somente_autenticada
|
232
|
+
must validate_presence_of :url_retorno
|
233
|
+
end
|
234
|
+
|
235
|
+
it "autorizar nao autenticada requires url_retorno" do
|
236
|
+
subject.autorizar_nao_autenticada
|
237
|
+
must validate_presence_of :url_retorno
|
238
|
+
end
|
239
|
+
|
240
|
+
it "autorizacao direta doesnt require url_retorno" do
|
241
|
+
subject.autorizacao_direta
|
242
|
+
wont validate_presence_of :url_retorno
|
243
|
+
end
|
244
|
+
|
245
|
+
it { must ensure_length_of(:url_retorno).is_at_least(1).is_at_most(1024) }
|
246
|
+
|
247
|
+
it "doesnt validate url_retorno length for autorizacao direta" do
|
248
|
+
subject.autorizacao_direta
|
249
|
+
wont ensure_length_of(:url_retorno).is_at_least(1).is_at_most(1024)
|
250
|
+
end
|
251
|
+
|
252
|
+
it { must validate_presence_of :autorizar }
|
253
|
+
it {
|
254
|
+
must ensure_inclusion_of(:autorizar).in_array [
|
255
|
+
_::SOMENTE_AUTENTICAR, _::AUTORIZAR_SE_AUTENTICADA,
|
256
|
+
_::AUTORIZAR_NAO_AUTENTICADA, _::AUTORIZACAO_DIRETA, _::RECORRENTE
|
257
|
+
]
|
258
|
+
}
|
259
|
+
|
260
|
+
it "doesnt support autorizacao_direta on debito operations" do
|
261
|
+
pg = subject.class::FormaPagamento.new
|
262
|
+
pg.debito Cieloz::Bandeiras::VISA
|
263
|
+
subject.forma_pagamento = pg
|
264
|
+
|
265
|
+
subject.autorizacao_direta
|
266
|
+
|
267
|
+
refute subject.valid?
|
268
|
+
assert_equal "Direct auth available for credit only", subject.errors[:autorizar].first
|
269
|
+
end
|
270
|
+
|
271
|
+
def refute_authentication_supported
|
272
|
+
refute subject.valid?
|
273
|
+
assert_equal "Authentication not supported", subject.errors[:autorizar].first
|
274
|
+
end
|
275
|
+
|
276
|
+
it "refute authentication support for DINERS, DISCOVER, ELO and AMEX" do
|
277
|
+
(Cieloz::Bandeiras::ALL - subject.class::FormaPagamento::SUPORTAM_AUTENTICACAO).each { |b|
|
278
|
+
pg = subject.class::FormaPagamento.new
|
279
|
+
pg.credito b
|
280
|
+
subject.forma_pagamento = pg
|
281
|
+
|
282
|
+
subject.somente_autenticar
|
283
|
+
refute_authentication_supported
|
284
|
+
|
285
|
+
subject.autorizar_somente_autenticada
|
286
|
+
refute_authentication_supported
|
287
|
+
|
288
|
+
subject.autorizar_nao_autenticada
|
289
|
+
refute_authentication_supported
|
290
|
+
|
291
|
+
subject.recorrente
|
292
|
+
refute_authentication_supported
|
293
|
+
}
|
294
|
+
end
|
295
|
+
|
296
|
+
it "has authentication support for VISA and MASTERCARD" do
|
297
|
+
subject.class::FormaPagamento::SUPORTAM_AUTENTICACAO.each { |b|
|
298
|
+
pg = subject.class::FormaPagamento.new
|
299
|
+
pg.credito b
|
300
|
+
subject.forma_pagamento = pg
|
301
|
+
|
302
|
+
subject.somente_autenticar
|
303
|
+
assert subject.errors[:autorizacao].empty?
|
304
|
+
|
305
|
+
subject.autorizar_somente_autenticada
|
306
|
+
assert subject.errors[:autorizacao].empty?
|
307
|
+
|
308
|
+
subject.autorizar_nao_autenticada
|
309
|
+
assert subject.errors[:autorizacao].empty?
|
310
|
+
|
311
|
+
subject.recorrente
|
312
|
+
assert subject.errors[:autorizacao].empty?
|
313
|
+
}
|
314
|
+
end
|
315
|
+
|
316
|
+
it { must validate_presence_of :capturar }
|
317
|
+
it { must ensure_inclusion_of(:capturar).in_array(["true", "false"]) }
|
318
|
+
|
319
|
+
it { must ensure_length_of(:campo_livre).is_at_most(128) }
|
320
|
+
|
321
|
+
it "extracts bin from DadosPortador" do
|
322
|
+
# no DadosPortador - bin should be nil
|
323
|
+
assert subject.attributes[:bin].nil?
|
324
|
+
|
325
|
+
p = subject.class::DadosPortador.new numero: 1234567887654321
|
326
|
+
subject.dados_portador = p
|
327
|
+
assert_equal "123456", subject.attributes[:bin]
|
328
|
+
end
|
329
|
+
|
330
|
+
it "validates dados portador on mode Buy Page Loja" do
|
331
|
+
Cieloz::Configuracao.store_mode!
|
332
|
+
must validate_presence_of :dados_portador
|
333
|
+
end
|
334
|
+
|
335
|
+
describe "Buy Page Cielo" do
|
336
|
+
it "wont validate dados portador if mode is nil" do
|
337
|
+
Cieloz::Configuracao.reset!
|
338
|
+
wont validate_presence_of :dados_portador
|
339
|
+
end
|
340
|
+
|
341
|
+
it "wont validate dados portador on hosted mode" do
|
342
|
+
Cieloz::Configuracao.cielo_mode!
|
343
|
+
wont validate_presence_of :dados_portador
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
347
|
+
it "validates parcela minima is R$ 5,00" do
|
348
|
+
subject.dados_pedido = subject.class::DadosPedido.new numero: 123,
|
349
|
+
valor: 1400, idioma: "PT", moeda: "986", data_hora: Time.now
|
350
|
+
|
351
|
+
subject.forma_pagamento = subject.class::FormaPagamento
|
352
|
+
.new.parcelado Cieloz::Bandeiras::VISA, 3
|
353
|
+
|
354
|
+
refute subject.valid?
|
355
|
+
msg = "Installment should be greater than or equal to R$ 5,00"
|
356
|
+
assert_equal msg, subject.errors[:forma_pagamento].first
|
357
|
+
end
|
358
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<dados-pedido>
|
2
|
+
<numero><%= pedido.numero %></numero>
|
3
|
+
<valor><%= pedido.valor %></valor>
|
4
|
+
<moeda><%= pedido.moeda %></moeda>
|
5
|
+
<data-hora><%= pedido.attributes[:data_hora] %></data-hora>
|
6
|
+
<descricao><%= pedido.descricao %></descricao>
|
7
|
+
<idioma><%= pedido.idioma %></idioma>
|
8
|
+
<soft-descriptor><%= pedido.soft_descriptor %></soft-descriptor>
|
9
|
+
</dados-pedido>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<dados-portador>
|
2
|
+
<numero><%= portador.numero %></numero>
|
3
|
+
<validade><%= portador.validade %></validade>
|
4
|
+
<indicador><%= portador.indicador %></indicador>
|
5
|
+
<codigo-seguranca><%= portador.codigo_seguranca %></codigo-seguranca>
|
6
|
+
</dados-portador>
|
7
|
+
<bin><%= portador.numero.to_s[0..5] %></bin>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
+
<transacao versao="1.2.0" id="468c1608-4ec7-4acd-b7ea-d7bf96e135f5" xmlns="http://ecommerce.cbmp.com.br">
|
3
|
+
<tid><%= tid %></tid>
|
4
|
+
<dados-pedido>
|
5
|
+
<numero><%= pedido.numero %></numero>
|
6
|
+
<valor><%= pedido.valor %></valor>
|
7
|
+
<moeda><%= pedido.moeda %></moeda>
|
8
|
+
<data-hora><%= pedido.data_hora %></data-hora>
|
9
|
+
<descricao><%= pedido.descricao %></descricao>
|
10
|
+
<idioma><%= pedido.idioma %></idioma>
|
11
|
+
</dados-pedido>
|
12
|
+
<forma-pagamento>
|
13
|
+
<bandeira><%= pagamento.bandeira %></bandeira>
|
14
|
+
<produto><%= pagamento.produto %></produto>
|
15
|
+
<parcelas><%= pagamento.parcelas %></parcelas>
|
16
|
+
</forma-pagamento>
|
17
|
+
<status><%= status_txn %></status>
|
18
|
+
<url-autenticacao><%= url_cielo %></url-autenticacao>
|
19
|
+
</transacao>
|
metadata
ADDED
@@ -0,0 +1,280 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cieloz
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Fábio Luiz Nery de Miranda
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-02-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nokogiri
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: activesupport
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: activemodel
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: turn
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: fakeweb
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: debugger
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: bourne
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - '='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 1.3.0
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - '='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 1.3.0
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: shoulda-matchers
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: minitest-matchers
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
description: A utility gem for Cielo Integration
|
175
|
+
email:
|
176
|
+
- fabio@miranti.net.br
|
177
|
+
executables: []
|
178
|
+
extensions: []
|
179
|
+
extra_rdoc_files: []
|
180
|
+
files:
|
181
|
+
- .gitignore
|
182
|
+
- Gemfile
|
183
|
+
- LICENSE.txt
|
184
|
+
- README.md
|
185
|
+
- Rakefile
|
186
|
+
- cieloz.gemspec
|
187
|
+
- config/locales/en.yml
|
188
|
+
- config/locales/pt-BR.yml
|
189
|
+
- lib/cieloz.rb
|
190
|
+
- lib/cieloz/bandeiras.rb
|
191
|
+
- lib/cieloz/builder.rb
|
192
|
+
- lib/cieloz/configuracao.rb
|
193
|
+
- lib/cieloz/helpers.rb
|
194
|
+
- lib/cieloz/homologacao.rb
|
195
|
+
- lib/cieloz/requisicao.rb
|
196
|
+
- lib/cieloz/requisicao/dados_ec.rb
|
197
|
+
- lib/cieloz/requisicao/resposta.rb
|
198
|
+
- lib/cieloz/requisicao/resposta/erro.rb
|
199
|
+
- lib/cieloz/requisicao/resposta/transacao.rb
|
200
|
+
- lib/cieloz/requisicao_tid.rb
|
201
|
+
- lib/cieloz/requisicao_transacao.rb
|
202
|
+
- lib/cieloz/requisicao_transacao/dados_pedido.rb
|
203
|
+
- lib/cieloz/requisicao_transacao/dados_portador.rb
|
204
|
+
- lib/cieloz/requisicao_transacao/forma_pagamento.rb
|
205
|
+
- lib/cieloz/version.rb
|
206
|
+
- readme/cielo_developer_guide_2.0.3.pdf
|
207
|
+
- readme/cielo_guia_seguranca_ecommerce.pdf
|
208
|
+
- readme/cielo_payment_states.png
|
209
|
+
- readme/contrato_de_afiliacao_ao_sistema_cielo.pdf
|
210
|
+
- readme/credentials.png
|
211
|
+
- readme/dicas_preventivas_para_vendas_mais_seguras.pdf
|
212
|
+
- readme/email_cielo.pdf
|
213
|
+
- readme/lista_de_documentos_necessarios_para_afiliacao_de_vendas_pela_internet_pessoa_juridica.pdf
|
214
|
+
- readme/mastercard_securecodedemo.swf
|
215
|
+
- readme/supported_products.png
|
216
|
+
- readme/termo_de_adesao_de_risco.pdf
|
217
|
+
- readme/verified_by_visa.png
|
218
|
+
- test/integration/integration_test.rb
|
219
|
+
- test/minitest_helper.rb
|
220
|
+
- test/unit/bandeiras_operacoes_test.rb
|
221
|
+
- test/unit/builder_test.rb
|
222
|
+
- test/unit/configuracao_test.rb
|
223
|
+
- test/unit/requisicao_autorizacao_tid_test.rb
|
224
|
+
- test/unit/requisicao_cancelamento_test.rb
|
225
|
+
- test/unit/requisicao_captura_test.rb
|
226
|
+
- test/unit/requisicao_consulta_test.rb
|
227
|
+
- test/unit/requisicao_test.rb
|
228
|
+
- test/unit/requisicao_transacao_test.rb
|
229
|
+
- test/unit/validations_test.rb
|
230
|
+
- test/unit/xml/dados-ec.xml
|
231
|
+
- test/unit/xml/dados-pagamento.xml
|
232
|
+
- test/unit/xml/dados-pedido.xml
|
233
|
+
- test/unit/xml/dados-portador.xml
|
234
|
+
- test/unit/xml/dados-simple_attrs.xml
|
235
|
+
- test/unit/xml/erro.xml
|
236
|
+
- test/unit/xml/transacao.xml
|
237
|
+
homepage: https://github.com/fabiolnm/cieloz
|
238
|
+
licenses: []
|
239
|
+
post_install_message:
|
240
|
+
rdoc_options: []
|
241
|
+
require_paths:
|
242
|
+
- lib
|
243
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
244
|
+
none: false
|
245
|
+
requirements:
|
246
|
+
- - ! '>='
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
version: '0'
|
249
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
|
+
none: false
|
251
|
+
requirements:
|
252
|
+
- - ! '>='
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: '0'
|
255
|
+
requirements: []
|
256
|
+
rubyforge_project:
|
257
|
+
rubygems_version: 1.8.23
|
258
|
+
signing_key:
|
259
|
+
specification_version: 3
|
260
|
+
summary: ''
|
261
|
+
test_files:
|
262
|
+
- test/integration/integration_test.rb
|
263
|
+
- test/minitest_helper.rb
|
264
|
+
- test/unit/bandeiras_operacoes_test.rb
|
265
|
+
- test/unit/builder_test.rb
|
266
|
+
- test/unit/configuracao_test.rb
|
267
|
+
- test/unit/requisicao_autorizacao_tid_test.rb
|
268
|
+
- test/unit/requisicao_cancelamento_test.rb
|
269
|
+
- test/unit/requisicao_captura_test.rb
|
270
|
+
- test/unit/requisicao_consulta_test.rb
|
271
|
+
- test/unit/requisicao_test.rb
|
272
|
+
- test/unit/requisicao_transacao_test.rb
|
273
|
+
- test/unit/validations_test.rb
|
274
|
+
- test/unit/xml/dados-ec.xml
|
275
|
+
- test/unit/xml/dados-pagamento.xml
|
276
|
+
- test/unit/xml/dados-pedido.xml
|
277
|
+
- test/unit/xml/dados-portador.xml
|
278
|
+
- test/unit/xml/dados-simple_attrs.xml
|
279
|
+
- test/unit/xml/erro.xml
|
280
|
+
- test/unit/xml/transacao.xml
|