cielo_old 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.travis.yml +6 -0
- data/Gemfile +20 -0
- data/Gemfile.lock +105 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +140 -0
- data/Rakefile +48 -0
- data/cielo-0.2.5.gem +0 -0
- data/cielo.gemspec +87 -0
- data/lib/cielo/connection.rb +76 -0
- data/lib/cielo/string.rb +5 -0
- data/lib/cielo/token.rb +20 -0
- data/lib/cielo/transaction.rb +133 -0
- data/lib/cielo/version.rb +6 -0
- data/lib/cielo.rb +39 -0
- data/lib/generators/cielo/install_generator.rb +14 -0
- data/lib/generators/templates/cielo.rb +30 -0
- data/spec/cielo/connection_spec.rb +38 -0
- data/spec/cielo/token_spec.rb +33 -0
- data/spec/cielo/transaction_spec.rb +227 -0
- data/spec/spec_helper.rb +5 -0
- metadata +192 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 40f64619937234a48b235c5b74f8c0afdd7fe537
|
4
|
+
data.tar.gz: 025baa2ca17f48dc901f1bd81045be38762ac71a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 41a7285895d9bede9792341d28fbc898c7fa7d07fdc1b493aa53eb911a42cc010c40a7e2ac76b07f8af828f4ee7f38317ab51d9a9ac65e4ebdef5c980ea73c17
|
7
|
+
data.tar.gz: 326bbeb2170a6552e7d9dc124faf99859f9d7a4717e4c43f8201a563105ffee984a3189493ad930868656a487041507cac592a476b15f86b0185e3d2aa09307d
|
data/.document
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
ruby '2.1.2'
|
2
|
+
#ruby=2.1.2@cielo
|
3
|
+
source 'http://rubygems.org'
|
4
|
+
|
5
|
+
# Add dependencies required to use your gem here.
|
6
|
+
# Example:
|
7
|
+
gem 'activesupport', '>= 3.0.7'
|
8
|
+
gem 'i18n'
|
9
|
+
gem 'builder', '>= 2.0.0'
|
10
|
+
|
11
|
+
# Add dependencies to develop your gem here.
|
12
|
+
# Include everything needed to run rake, tests, features, etc.
|
13
|
+
group :development do
|
14
|
+
gem 'watir-webdriver'
|
15
|
+
gem 'shoulda', '>= 0'
|
16
|
+
gem 'bundler'
|
17
|
+
gem 'jeweler'
|
18
|
+
gem 'rspec'
|
19
|
+
gem 'fakeweb'
|
20
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (4.2.3)
|
5
|
+
i18n (~> 0.7)
|
6
|
+
json (~> 1.7, >= 1.7.7)
|
7
|
+
minitest (~> 5.1)
|
8
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
9
|
+
tzinfo (~> 1.1)
|
10
|
+
addressable (2.3.8)
|
11
|
+
builder (3.2.2)
|
12
|
+
childprocess (0.5.6)
|
13
|
+
ffi (~> 1.0, >= 1.0.11)
|
14
|
+
descendants_tracker (0.0.4)
|
15
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
16
|
+
diff-lcs (1.2.5)
|
17
|
+
fakeweb (1.3.0)
|
18
|
+
faraday (0.9.1)
|
19
|
+
multipart-post (>= 1.2, < 3)
|
20
|
+
ffi (1.9.10)
|
21
|
+
git (1.2.9.1)
|
22
|
+
github_api (0.12.3)
|
23
|
+
addressable (~> 2.3)
|
24
|
+
descendants_tracker (~> 0.0.4)
|
25
|
+
faraday (~> 0.8, < 0.10)
|
26
|
+
hashie (>= 3.3)
|
27
|
+
multi_json (>= 1.7.5, < 2.0)
|
28
|
+
nokogiri (~> 1.6.3)
|
29
|
+
oauth2
|
30
|
+
hashie (3.4.2)
|
31
|
+
highline (1.7.2)
|
32
|
+
i18n (0.7.0)
|
33
|
+
jeweler (2.0.1)
|
34
|
+
builder
|
35
|
+
bundler (>= 1.0)
|
36
|
+
git (>= 1.2.5)
|
37
|
+
github_api
|
38
|
+
highline (>= 1.6.15)
|
39
|
+
nokogiri (>= 1.5.10)
|
40
|
+
rake
|
41
|
+
rdoc
|
42
|
+
json (1.8.3)
|
43
|
+
jwt (1.5.1)
|
44
|
+
mini_portile (0.6.2)
|
45
|
+
minitest (5.7.0)
|
46
|
+
multi_json (1.11.2)
|
47
|
+
multi_xml (0.5.5)
|
48
|
+
multipart-post (2.0.0)
|
49
|
+
nokogiri (1.6.6.2)
|
50
|
+
mini_portile (~> 0.6.0)
|
51
|
+
oauth2 (1.0.0)
|
52
|
+
faraday (>= 0.8, < 0.10)
|
53
|
+
jwt (~> 1.0)
|
54
|
+
multi_json (~> 1.3)
|
55
|
+
multi_xml (~> 0.5)
|
56
|
+
rack (~> 1.2)
|
57
|
+
rack (1.6.4)
|
58
|
+
rake (10.4.2)
|
59
|
+
rdoc (4.2.0)
|
60
|
+
json (~> 1.4)
|
61
|
+
rspec (3.3.0)
|
62
|
+
rspec-core (~> 3.3.0)
|
63
|
+
rspec-expectations (~> 3.3.0)
|
64
|
+
rspec-mocks (~> 3.3.0)
|
65
|
+
rspec-core (3.3.1)
|
66
|
+
rspec-support (~> 3.3.0)
|
67
|
+
rspec-expectations (3.3.0)
|
68
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
+
rspec-support (~> 3.3.0)
|
70
|
+
rspec-mocks (3.3.1)
|
71
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
72
|
+
rspec-support (~> 3.3.0)
|
73
|
+
rspec-support (3.3.0)
|
74
|
+
rubyzip (1.1.7)
|
75
|
+
selenium-webdriver (2.46.2)
|
76
|
+
childprocess (~> 0.5)
|
77
|
+
multi_json (~> 1.0)
|
78
|
+
rubyzip (~> 1.0)
|
79
|
+
websocket (~> 1.0)
|
80
|
+
shoulda (3.5.0)
|
81
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
82
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
83
|
+
shoulda-context (1.2.1)
|
84
|
+
shoulda-matchers (2.8.0)
|
85
|
+
activesupport (>= 3.0.0)
|
86
|
+
thread_safe (0.3.5)
|
87
|
+
tzinfo (1.2.2)
|
88
|
+
thread_safe (~> 0.1)
|
89
|
+
watir-webdriver (0.8.0)
|
90
|
+
selenium-webdriver (>= 2.46.2)
|
91
|
+
websocket (1.2.2)
|
92
|
+
|
93
|
+
PLATFORMS
|
94
|
+
ruby
|
95
|
+
|
96
|
+
DEPENDENCIES
|
97
|
+
activesupport (>= 3.0.7)
|
98
|
+
builder (>= 2.0.0)
|
99
|
+
bundler
|
100
|
+
fakeweb
|
101
|
+
i18n
|
102
|
+
jeweler
|
103
|
+
rspec
|
104
|
+
shoulda
|
105
|
+
watir-webdriver
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Crafters Software Studio
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
= cielo
|
2
|
+
|
3
|
+
{<img src="https://secure.travis-ci.org/crafters/cielo.png" />}[http://travis-ci.org/crafters/cielo]
|
4
|
+
|
5
|
+
Integração com a Cielo via WebServices [Buy Page Cielo / Buy Page Loja ]
|
6
|
+
|
7
|
+
== Funcionalidades Implementadas
|
8
|
+
|
9
|
+
* Criação de transação
|
10
|
+
* Consulta de stauts de transação
|
11
|
+
* Captura de transação
|
12
|
+
* Cancelamento de transação
|
13
|
+
|
14
|
+
== USO
|
15
|
+
|
16
|
+
gem install cielo
|
17
|
+
|
18
|
+
=== Ambiente de teste (Homologação)
|
19
|
+
|
20
|
+
== Buy Page Loja
|
21
|
+
|
22
|
+
transaction = Cielo::Transaction.new
|
23
|
+
|
24
|
+
transaction_parameters = {
|
25
|
+
numero: "XXX",
|
26
|
+
valor: "123123",
|
27
|
+
moeda: "986",
|
28
|
+
bandeira: 'visa',
|
29
|
+
:'url-retorno' => 'http://url.retorno',
|
30
|
+
cartao_numero: '4012001037141112',
|
31
|
+
cartao_validade: '201805',
|
32
|
+
cartao_seguranca: '123',
|
33
|
+
cartao_portador: 'Lorem Ipsum Dolor'
|
34
|
+
}
|
35
|
+
|
36
|
+
transaction.create!(transaction_parameters, :store) #inicia uma nova transação
|
37
|
+
|
38
|
+
transaction.verify!("TID OF THE TRANSACTION") #verifica o status de uma transação
|
39
|
+
|
40
|
+
transaction.catch!("TID OF THE TRANSACTION") #captura a transação
|
41
|
+
|
42
|
+
transaction.cancel!("TID OF THE TRANSACTION") #cancela a transação
|
43
|
+
|
44
|
+
== Buy Page Loja com token
|
45
|
+
|
46
|
+
token_request = Cielo::Token.new
|
47
|
+
|
48
|
+
token_parameters = {
|
49
|
+
:cartao_numero => '4012888888881881',
|
50
|
+
:cartao_validade => '201508',
|
51
|
+
:cartao_portador => 'Nome portador' }
|
52
|
+
}
|
53
|
+
|
54
|
+
response = token_request.create! token_parameters, :store
|
55
|
+
# O token pode ser armazenado no banco, será sempre igual para o cartão em questão
|
56
|
+
token = response[:"retorno-token"][:token][:"dados-token"][:"codigo-token"]
|
57
|
+
|
58
|
+
transaction = Cielo::Transaction.new
|
59
|
+
|
60
|
+
transaction_parameters = {
|
61
|
+
numero: "XXX",
|
62
|
+
valor: "123123",
|
63
|
+
moeda: "986",
|
64
|
+
bandeira: 'visa',
|
65
|
+
parcelas: 2,
|
66
|
+
token: token, # Esse token substitui o cartão de crédito
|
67
|
+
autorizar: 3 # Quando a transação usa token, a tag 'autorizar' precisa ser 3 ou 4
|
68
|
+
}
|
69
|
+
|
70
|
+
transaction.create!(transaction_parameters, :store) #inicia uma nova transação
|
71
|
+
|
72
|
+
Caso seja necessário fazer uma transação recorrente, basta alterar a tag autorizar para 4.
|
73
|
+
|
74
|
+
Uma transação com um o campo "gerar-token" => true, gera um token correspondente que pode ser armazenado para transações futuras.
|
75
|
+
|
76
|
+
== Buy Page Cielo
|
77
|
+
|
78
|
+
transaction = Cielo::Transaction.new
|
79
|
+
|
80
|
+
transaction_parameters = {
|
81
|
+
numero: "XXX",
|
82
|
+
valor: "123123",
|
83
|
+
moeda: "986",
|
84
|
+
bandeira: 'visa',
|
85
|
+
:'url-retorno' => 'http://url.retorno',
|
86
|
+
}
|
87
|
+
|
88
|
+
transaction.create!(transaction_parameters, :cielo) #inicia uma nova transação / :cielo é padrão
|
89
|
+
|
90
|
+
transaction.verify!("TID OF THE TRANSACTION") #verifica o status de uma transação
|
91
|
+
|
92
|
+
transaction.catch!("TID OF THE TRANSACTION") #captura a transação
|
93
|
+
|
94
|
+
transaction.cancel!("TID OF THE TRANSACTION") #captura a transação
|
95
|
+
|
96
|
+
=== Rails
|
97
|
+
|
98
|
+
rails g cielo:install
|
99
|
+
|
100
|
+
Esse comando vai gerar um arquivo config/initializers/cielo.rb que já vem configurado para o ambiente de testes, para produção garanta que os dados estão corretos.
|
101
|
+
|
102
|
+
=== Outras plataformas
|
103
|
+
|
104
|
+
Se torna necessário somente configurar o módulo Cielo
|
105
|
+
|
106
|
+
Cielo.setup do |config|
|
107
|
+
config.environment = :test #:production
|
108
|
+
config.numero_afiliacao = "XXX" # fornecido pela cielo
|
109
|
+
config.chave_acesso = "XXX" # fornecido pela cielo
|
110
|
+
config.return_path = "http://path/to" # URL para onde a cielo redirecionara seu usuário após inserir os dados na cielo.
|
111
|
+
end
|
112
|
+
|
113
|
+
== Avisos
|
114
|
+
|
115
|
+
* O retorno da cielo é convertido em um hash, então, atributos no xml como url-retorno ficam :"url-retorno", cuidado com esses detalhes.
|
116
|
+
* Foi desenvolvido e testado em ruby 2.0.0, 1.9.3, 1.9.2 e 1.8.7
|
117
|
+
|
118
|
+
== Contributing to cielo
|
119
|
+
|
120
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
121
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
122
|
+
* Fork the project
|
123
|
+
* Start a feature/bugfix branch
|
124
|
+
* Commit and push until you are happy with your contribution
|
125
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
126
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
127
|
+
|
128
|
+
== Colaboradores
|
129
|
+
|
130
|
+
* Antônio Roberto Silva [ http://github.com/devton , http://twitter.com/dev_ton ]
|
131
|
+
* Felipe Rodrigues [ http://github.com/felipero , http://twitter.com/felipero ]
|
132
|
+
* Rafael Felix [ http://github.com/fellix , http://twitter.com/rs_felix ]
|
133
|
+
* Gabriel Paladino and Scupen [https://github.com/gabpaladino , https://github.com/scupen] (Ruby 1.8.7 support)
|
134
|
+
* Wilbert Ribeiro [https://github.com/wilbert/cielo, https://twitter.com/wilbertribeiro ]
|
135
|
+
* Elton Okada [https://github.com/eltonokada, https://twitter.com/eltonokada ]
|
136
|
+
|
137
|
+
== Copyright
|
138
|
+
|
139
|
+
Copyright (c) 2011 Crafters Software Studio. See LICENSE.txt for
|
140
|
+
further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
require "rspec/core/rake_task"
|
14
|
+
RSpec::Core::RakeTask.new
|
15
|
+
|
16
|
+
require 'jeweler'
|
17
|
+
require './lib/cielo/version.rb'
|
18
|
+
Jeweler::Tasks.new do |gem|
|
19
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
20
|
+
gem.name = "cielo_old"
|
21
|
+
gem.license = "MIT"
|
22
|
+
gem.summary = 'Integração com a cielo'
|
23
|
+
gem.description = 'Integração com a cielo'
|
24
|
+
gem.email = 'ton.garcia.jr@gmail.com'
|
25
|
+
gem.authors = ['Ilton']
|
26
|
+
gem.version = Cielo::VERSION
|
27
|
+
# dependencies defined in Gemfile
|
28
|
+
end
|
29
|
+
Jeweler::RubygemsDotOrgTasks.new
|
30
|
+
|
31
|
+
require 'rake/testtask'
|
32
|
+
Rake::TestTask.new(:test) do |test|
|
33
|
+
test.libs << 'lib' << 'test'
|
34
|
+
test.pattern = 'test/**/test_*.rb'
|
35
|
+
test.verbose = true
|
36
|
+
end
|
37
|
+
|
38
|
+
task :default => :test
|
39
|
+
|
40
|
+
require 'rdoc/task'
|
41
|
+
Rake::RDocTask.new do |rdoc|
|
42
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
43
|
+
|
44
|
+
rdoc.rdoc_dir = 'rdoc'
|
45
|
+
rdoc.title = "cielo #{version}"
|
46
|
+
rdoc.rdoc_files.include('README*')
|
47
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
48
|
+
end
|
data/cielo-0.2.5.gem
ADDED
Binary file
|
data/cielo.gemspec
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: cielo 0.1.5 ruby lib
|
6
|
+
# coding: utf-8
|
7
|
+
lib = File.expand_path('../lib', __FILE__)
|
8
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
9
|
+
require 'cielo/version'
|
10
|
+
|
11
|
+
Gem::Specification.new do |s|
|
12
|
+
s.name = 'cielo_old'
|
13
|
+
s.version = Cielo::VERSION
|
14
|
+
|
15
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
16
|
+
s.authors = ['Ilton']
|
17
|
+
s.date = '2014-01-21'
|
18
|
+
s.description = 'Integração com a Cielo'
|
19
|
+
s.email = 'ton.garcia.jr@gmail.com'
|
20
|
+
s.extra_rdoc_files = [
|
21
|
+
'LICENSE.txt',
|
22
|
+
'README.rdoc'
|
23
|
+
]
|
24
|
+
s.files = [
|
25
|
+
'.document',
|
26
|
+
'.travis.yml',
|
27
|
+
'Gemfile',
|
28
|
+
'Gemfile.lock',
|
29
|
+
'LICENSE.txt',
|
30
|
+
'README.rdoc',
|
31
|
+
'Rakefile',
|
32
|
+
'cielo.gemspec',
|
33
|
+
'lib/cielo.rb',
|
34
|
+
'lib/cielo/connection.rb',
|
35
|
+
'lib/cielo/token.rb',
|
36
|
+
'lib/cielo/transaction.rb',
|
37
|
+
'lib/cielo/version.rb',
|
38
|
+
'lib/generators/cielo/install_generator.rb',
|
39
|
+
'lib/generators/templates/cielo.rb',
|
40
|
+
'spec/cielo/connection_spec.rb',
|
41
|
+
'spec/cielo/token_spec.rb',
|
42
|
+
'spec/cielo/transaction_spec.rb',
|
43
|
+
'spec/spec_helper.rb'
|
44
|
+
]
|
45
|
+
|
46
|
+
s.licenses = ['MIT']
|
47
|
+
s.require_paths = ['lib']
|
48
|
+
s.rubygems_version = '2.1.9'
|
49
|
+
s.summary = 'Integração com a cielo'
|
50
|
+
|
51
|
+
if s.respond_to? :specification_version then
|
52
|
+
s.specification_version = 4
|
53
|
+
|
54
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
55
|
+
s.add_runtime_dependency(%q<activesupport>, ['>= 3.0.7'])
|
56
|
+
s.add_runtime_dependency(%q<i18n>, ['>= 0'])
|
57
|
+
s.add_runtime_dependency(%q<builder>, ['>= 2.0.0'])
|
58
|
+
s.add_development_dependency(%q<watir-webdriver>, ['>= 0'])
|
59
|
+
s.add_development_dependency(%q<shoulda>, ['>= 0'])
|
60
|
+
s.add_development_dependency(%q<bundler>, ['>= 0'])
|
61
|
+
s.add_development_dependency(%q<jeweler>, ['>= 0'])
|
62
|
+
s.add_development_dependency(%q<rspec>, ['>= 0'])
|
63
|
+
s.add_development_dependency(%q<fakeweb>, ['>= 0'])
|
64
|
+
else
|
65
|
+
s.add_dependency(%q<activesupport>, ['>= 3.0.7'])
|
66
|
+
s.add_dependency(%q<i18n>, ['>= 0'])
|
67
|
+
s.add_dependency(%q<builder>, ['>= 2.0.0'])
|
68
|
+
s.add_dependency(%q<watir-webdriver>, ['>= 0'])
|
69
|
+
s.add_dependency(%q<shoulda>, ['>= 0'])
|
70
|
+
s.add_dependency(%q<bundler>, ['>= 0'])
|
71
|
+
s.add_dependency(%q<jeweler>, ['>= 0'])
|
72
|
+
s.add_dependency(%q<rspec>, ['>= 0'])
|
73
|
+
s.add_dependency(%q<fakeweb>, ['>= 0'])
|
74
|
+
end
|
75
|
+
else
|
76
|
+
s.add_dependency(%q<activesupport>, ['>= 3.0.7'])
|
77
|
+
s.add_dependency(%q<i18n>, ['>= 0'])
|
78
|
+
s.add_dependency(%q<builder>, ['>= 2.0.0'])
|
79
|
+
s.add_dependency(%q<watir-webdriver>, ['>= 0'])
|
80
|
+
s.add_dependency(%q<shoulda>, ['>= 0'])
|
81
|
+
s.add_dependency(%q<bundler>, ['>= 0'])
|
82
|
+
s.add_dependency(%q<jeweler>, ['>= 0'])
|
83
|
+
s.add_dependency(%q<rspec>, ['>= 0'])
|
84
|
+
s.add_dependency(%q<fakeweb>, ['>= 0'])
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
@@ -0,0 +1,76 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
|
3
|
+
module Cielo
|
4
|
+
class Connection
|
5
|
+
attr_reader :environment
|
6
|
+
attr_reader :numero_afiliacao
|
7
|
+
attr_reader :chave_acesso
|
8
|
+
|
9
|
+
def initialize numero_afiliacao = Cielo.numero_afiliacao, chave_acesso = Cielo.chave_acesso
|
10
|
+
@environment = eval(Cielo.environment.to_s.capitalize)
|
11
|
+
@numero_afiliacao = numero_afiliacao
|
12
|
+
@chave_acesso = chave_acesso
|
13
|
+
port = 443
|
14
|
+
|
15
|
+
# if behind a proxy so set it up here
|
16
|
+
Cielo.proxy.empty? ? @http = Net::HTTP.new(@environment::BASE_URL,port) : @http = Net::HTTP.new(@environment::BASE_URL,port, Cielo.proxy[:host], Cielo.proxy[:port], Cielo.proxy[:login], Cielo.proxy[:password])
|
17
|
+
|
18
|
+
@http.use_ssl = true
|
19
|
+
@http.open_timeout = 10*1000
|
20
|
+
@http.read_timeout = 40*1000
|
21
|
+
end
|
22
|
+
|
23
|
+
def request!(params={})
|
24
|
+
str_params = ""
|
25
|
+
params.each do |key, value|
|
26
|
+
str_params+="&" unless str_params.empty?
|
27
|
+
str_params+="#{key}=#{value}"
|
28
|
+
end
|
29
|
+
|
30
|
+
str_params = str_params.remove('<to_s/>')
|
31
|
+
@http.request_post(self.environment::WS_PATH, str_params)
|
32
|
+
end
|
33
|
+
|
34
|
+
def xml_builder(group_name, target=:after, &block)
|
35
|
+
xml = Builder::XmlMarkup.new
|
36
|
+
xml.instruct! :xml, :version=>"1.0", :encoding=>"ISO-8859-1"
|
37
|
+
xml.tag!(group_name, :id => "#{Time.now.to_i}", :versao => "1.2.1") do
|
38
|
+
block.call(xml) if target == :before
|
39
|
+
xml.tag!("dados-ec") do
|
40
|
+
xml.numero @numero_afiliacao #Cielo.numero_afiliacao
|
41
|
+
xml.chave @chave_acesso #Cielo.chave_acesso
|
42
|
+
end
|
43
|
+
block.call(xml) if target == :after
|
44
|
+
end
|
45
|
+
xml
|
46
|
+
end
|
47
|
+
|
48
|
+
def make_request!(message)
|
49
|
+
params = { :mensagem => message.target! }
|
50
|
+
result = self.request! params
|
51
|
+
parse_response(result)
|
52
|
+
end
|
53
|
+
|
54
|
+
def parse_response(response)
|
55
|
+
case response
|
56
|
+
when Net::HTTPSuccess
|
57
|
+
document = REXML::Document.new(response.body)
|
58
|
+
parse_elements(document.elements)
|
59
|
+
else
|
60
|
+
{:erro => { :codigo => "000", :mensagem => "Impossível contactar o servidor"}}
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def parse_elements(elements)
|
65
|
+
map={}
|
66
|
+
elements.each do |element|
|
67
|
+
element_map = {}
|
68
|
+
element_map = element.text if element.elements.empty? && element.attributes.empty?
|
69
|
+
element_map.merge!("value" => element.text) if element.elements.empty? && !element.attributes.empty?
|
70
|
+
element_map.merge!(parse_elements(element.elements)) unless element.elements.empty?
|
71
|
+
map.merge!(element.name => element_map)
|
72
|
+
end
|
73
|
+
map.symbolize_keys
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
data/lib/cielo/string.rb
ADDED
data/lib/cielo/token.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
module Cielo
|
3
|
+
class Token
|
4
|
+
def initialize
|
5
|
+
@connection = Cielo::Connection.new
|
6
|
+
end
|
7
|
+
|
8
|
+
def create!(parameters = {}, buy_page = :cielo)
|
9
|
+
message = @connection.xml_builder('requisicao-token') do |xml|
|
10
|
+
xml.tag!("dados-portador") do
|
11
|
+
xml.tag!('numero', parameters[:cartao_numero])
|
12
|
+
xml.tag!('validade', parameters[:cartao_validade])
|
13
|
+
xml.tag!('nome-portador', parameters[:cartao_portador])
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
@connection.make_request! message
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,133 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
module Cielo
|
3
|
+
class Transaction
|
4
|
+
|
5
|
+
attr_reader :numero_afiliacao
|
6
|
+
attr_reader :chave_acesso
|
7
|
+
|
8
|
+
def initialize numero_afiliacao = Cielo.numero_afiliacao, chave_acesso = Cielo.chave_acesso
|
9
|
+
@numero_afiliacao = numero_afiliacao
|
10
|
+
@chave_acesso = chave_acesso
|
11
|
+
@connection = Cielo::Connection.new @numero_afiliacao, @chave_acesso
|
12
|
+
end
|
13
|
+
|
14
|
+
def create!(parameters = {}, buy_page = :cielo)
|
15
|
+
if buy_page == :store
|
16
|
+
store_page_create!(parameters)
|
17
|
+
else
|
18
|
+
cielo_page_create!(parameters)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def store_page_create!(parameters={})
|
23
|
+
analysis_parameters(parameters, :buy_page_store)
|
24
|
+
message = @connection.xml_builder('requisicao-transacao') do |xml|
|
25
|
+
xml.tag!("dados-portador") do
|
26
|
+
if parameters[:token].present?
|
27
|
+
xml.tag!('token', parameters[:token])
|
28
|
+
else
|
29
|
+
xml.tag!('numero', parameters[:cartao_numero])
|
30
|
+
xml.tag!('validade', parameters[:cartao_validade])
|
31
|
+
xml.tag!('indicador', parameters[:cartao_indicador])
|
32
|
+
xml.tag!('codigo-seguranca', parameters[:cartao_seguranca])
|
33
|
+
xml.tag!('nome-portador', parameters[:cartao_portador])
|
34
|
+
xml.tag!('token', '')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
default_transaction_xml(xml, parameters)
|
38
|
+
end
|
39
|
+
|
40
|
+
@connection.make_request! message
|
41
|
+
end
|
42
|
+
|
43
|
+
def cielo_page_create!(parameters={})
|
44
|
+
analysis_parameters(parameters, :buy_page_cielo)
|
45
|
+
message = @connection.xml_builder("requisicao-transacao") do |xml|
|
46
|
+
default_transaction_xml(xml, parameters)
|
47
|
+
end
|
48
|
+
@connection.make_request! message
|
49
|
+
end
|
50
|
+
|
51
|
+
def verify!(cielo_tid)
|
52
|
+
return nil unless cielo_tid
|
53
|
+
message = @connection.xml_builder("requisicao-consulta", :before) do |xml|
|
54
|
+
xml.tid "#{cielo_tid}"
|
55
|
+
end
|
56
|
+
|
57
|
+
@connection.make_request! message
|
58
|
+
end
|
59
|
+
|
60
|
+
def catch!(cielo_tid)
|
61
|
+
return nil unless cielo_tid
|
62
|
+
message = @connection.xml_builder("requisicao-captura", :before) do |xml|
|
63
|
+
xml.tid "#{cielo_tid}"
|
64
|
+
end
|
65
|
+
@connection.make_request! message
|
66
|
+
end
|
67
|
+
|
68
|
+
def authorize!(cielo_tid)
|
69
|
+
return nil unless cielo_tid
|
70
|
+
message = @connection.xml_builder("requisicao-autorizacao-tid", :before) do |xml|
|
71
|
+
xml.tid "#{cielo_tid}"
|
72
|
+
end
|
73
|
+
@connection.make_request! message
|
74
|
+
end
|
75
|
+
|
76
|
+
def cancel!(cielo_tid)
|
77
|
+
return nil unless cielo_tid
|
78
|
+
message = @connection.xml_builder("requisicao-cancelamento", :before) do |xml|
|
79
|
+
xml.tid "#{cielo_tid}"
|
80
|
+
end
|
81
|
+
@connection.make_request! message
|
82
|
+
end
|
83
|
+
|
84
|
+
private
|
85
|
+
def default_transaction_xml(xml, parameters)
|
86
|
+
xml.tag!("dados-pedido") do
|
87
|
+
[:numero, :valor, :moeda, :"data-hora", :idioma].each do |key|
|
88
|
+
xml.tag!(key.to_s, parameters[key].to_s)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
xml.tag!("forma-pagamento") do
|
92
|
+
[:bandeira, :produto, :parcelas].each do |key|
|
93
|
+
xml.tag!(key.to_s, parameters[key].to_s)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
xml.tag!("url-retorno", parameters[:"url-retorno"])
|
97
|
+
xml.autorizar parameters[:autorizar].to_s
|
98
|
+
xml.capturar parameters[:capturar].to_s
|
99
|
+
xml.tag!("gerar-token", parameters[:"gerar-token"])
|
100
|
+
end
|
101
|
+
|
102
|
+
def analysis_parameters(parameters={}, buy_page = :buy_page_cielo)
|
103
|
+
to_analyze = [:numero, :valor, :bandeira, :"url-retorno"]
|
104
|
+
|
105
|
+
if buy_page == :buy_page_store
|
106
|
+
if parameters[:token].present?
|
107
|
+
to_analyze.concat([:token])
|
108
|
+
else
|
109
|
+
to_analyze.concat([:cartao_numero, :cartao_validade, :cartao_seguranca, :cartao_portador])
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
to_analyze.each do |parameter|
|
114
|
+
raise Cielo::MissingArgumentError, "Required parameter #{parameter} not found" unless parameters[parameter]
|
115
|
+
end
|
116
|
+
|
117
|
+
parameters.merge!(:moeda => "986") unless parameters[:moeda]
|
118
|
+
parameters.merge!(:"data-hora" => Time.now.strftime("%Y-%m-%dT%H:%M:%S")) unless parameters[:"data-hora"]
|
119
|
+
parameters.merge!(:idioma => "PT") unless parameters[:idioma]
|
120
|
+
parameters.merge!(:produto => "1") unless parameters[:produto]
|
121
|
+
parameters.merge!(:parcelas => "1") unless parameters[:parcelas]
|
122
|
+
parameters.merge!(:autorizar => "2") unless parameters[:autorizar]
|
123
|
+
parameters.merge!(:capturar => "true") unless parameters[:capturar]
|
124
|
+
parameters.merge!(:"url-retorno" => Cielo.return_path) unless parameters[:"url-retorno"]
|
125
|
+
parameters.merge!(:cartao_indicador => '1') unless parameters[:cartao_indicador] && buy_page == :buy_page_store
|
126
|
+
parameters.merge!(:"gerar-token" => false) unless parameters[:"gerar-token"]
|
127
|
+
|
128
|
+
parameters
|
129
|
+
end
|
130
|
+
|
131
|
+
|
132
|
+
end
|
133
|
+
end
|
data/lib/cielo.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
require 'active_support/core_ext/class/attribute_accessors'
|
3
|
+
require 'active_support/core_ext/module/attribute_accessors'
|
4
|
+
require 'active_support/core_ext/hash'
|
5
|
+
require 'net/http'
|
6
|
+
require 'net/https'
|
7
|
+
require 'rexml/document'
|
8
|
+
require 'builder'
|
9
|
+
require 'uri'
|
10
|
+
[:string, :connection, :transaction, :token].each { |lib| require "cielo/#{lib}" }
|
11
|
+
|
12
|
+
module Cielo
|
13
|
+
|
14
|
+
class Production
|
15
|
+
BASE_URL = 'ecommerce.cbmp.com.br'
|
16
|
+
WS_PATH = '/servicos/ecommwsec.do'
|
17
|
+
end
|
18
|
+
|
19
|
+
class Test
|
20
|
+
BASE_URL = 'ecommerce.cielo.com.br'
|
21
|
+
WS_PATH = '/servicos/ecommwsec.do'
|
22
|
+
end
|
23
|
+
|
24
|
+
@@environment = :test
|
25
|
+
mattr_accessor :environment
|
26
|
+
@@numero_afiliacao = '1001734898'
|
27
|
+
mattr_accessor :numero_afiliacao
|
28
|
+
@@chave_acesso='e84827130b9837473681c2787007da5914d6359947015a5cdb2b8843db0fa832'
|
29
|
+
mattr_accessor :chave_acesso
|
30
|
+
@@return_path = 'http://localhost:3000'
|
31
|
+
mattr_accessor :return_path
|
32
|
+
@@proxy = {}
|
33
|
+
mattr_accessor :proxy
|
34
|
+
|
35
|
+
def self.setup
|
36
|
+
yield self
|
37
|
+
end
|
38
|
+
class MissingArgumentError < StandardError; end
|
39
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Cielo
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path("../../templates", __FILE__)
|
5
|
+
|
6
|
+
desc "Cria o initializer da cielo na app rails"
|
7
|
+
|
8
|
+
def copy_initializer
|
9
|
+
template "cielo.rb", "config/initializers/cielo.rb"
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Use esse arquivo para configurar a integração com a cielo.
|
3
|
+
Cielo.setup do |config|
|
4
|
+
# Altere para production ao final dos seus testes
|
5
|
+
# config.environment = :test
|
6
|
+
|
7
|
+
# Edit it only if you need to setup a proxy
|
8
|
+
# config.proxy = {
|
9
|
+
# host: 'your.proxy.host',
|
10
|
+
# port: 'your_port',
|
11
|
+
# login: 'your_login',
|
12
|
+
# password: 'your_password'
|
13
|
+
# }
|
14
|
+
|
15
|
+
# Número de afiliação fornecido pela cielo.
|
16
|
+
# O numero padrão é o número usado para testes.
|
17
|
+
# Utilize "1001734898" para testes Buy page Cielo e "1006993069" para Buy page loja
|
18
|
+
# config.numero_afiliacao = "1001734898"
|
19
|
+
|
20
|
+
# Chave de acesso para autenticação.
|
21
|
+
# O número padrão é o número usado para os testes.
|
22
|
+
# hash para Buy Page Cielo: "e84827130b9837473681c2787007da5914d6359947015a5cdb2b8843db0fa832"
|
23
|
+
# hash para Buy page Loja: "25fbb99741c739dd84d7b06ec78c9bac718838630f30b112d033ce2e621b34f3"
|
24
|
+
# config.chave_acesso = "e84827130b9837473681c2787007da5914d6359947015a5cdb2b8843db0fa832"
|
25
|
+
|
26
|
+
# Após o processamento pela cielo, o usuário será redirecionado para uma página.
|
27
|
+
# que é configurada abaixo, nessa action você pode consultar o status do TID
|
28
|
+
# para poder mostrar na tela.
|
29
|
+
# config.return_path = "http://localhost:3000"
|
30
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Cielo::Connection do
|
4
|
+
before do
|
5
|
+
FakeWeb.allow_net_connect = true
|
6
|
+
|
7
|
+
@connection = Cielo::Connection.new
|
8
|
+
@connection2 = Cielo::Connection.new "1001734898", "e84827130b9837473681c2787007da5914d6359947015a5cdb2b8843db0fa832"
|
9
|
+
end
|
10
|
+
|
11
|
+
after do
|
12
|
+
FakeWeb.allow_net_connect = false
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should estabilish connection when was created" do
|
16
|
+
@connection.environment.should_not be_nil
|
17
|
+
@connection2.environment.should_not be_nil
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "making a request" do
|
21
|
+
it "should make a request" do
|
22
|
+
response = @connection.request! :data => "Anything"
|
23
|
+
|
24
|
+
response.body.should_not be_nil
|
25
|
+
response.should be_kind_of Net::HTTPSuccess
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "passing an access key and a client number" do
|
30
|
+
it "should make a request whithout any problem" do
|
31
|
+
response = @connection2.request! :data => "Anything"
|
32
|
+
|
33
|
+
response.body.should_not be_nil
|
34
|
+
response.should be_kind_of Net::HTTPSuccess
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Cielo::Token do
|
5
|
+
let(:card_params) { { :cartao_numero => '4012888888881881', :cartao_validade => '201508', :cartao_portador => 'Nome portador' } }
|
6
|
+
|
7
|
+
before do
|
8
|
+
@token = Cielo::Token.new
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "create a token for a card" do
|
12
|
+
before do
|
13
|
+
Cielo.stub(:numero_afiliacao).and_return('1006993069')
|
14
|
+
Cielo.stub(:chave_acesso).and_return('25fbb99741c739dd84d7b06ec78c9bac718838630f30b112d033ce2e621b34f3')
|
15
|
+
|
16
|
+
@params = card_params
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'delivers an successful message and have a card token' do
|
20
|
+
FakeWeb.register_uri(:any, 'https://ecommerce.cielo.com.br/servicos/ecommwsec.do',
|
21
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><retorno-token versao=\"1.2.1\" id=\"57239017\" xmlns=\"http://ecommerce.cbmp.com.br\"><token><dados-token><codigo-token>TuS6LeBHWjqFFtE7S3zR052Jl/KUlD+tYJFpAdlA87E=</codigo-token><status>1</status><numero-cartao-truncado>455187******0183</numero-cartao-truncado></dados-token></token></retorno-token>", :content_type => "application/xml")
|
22
|
+
|
23
|
+
response = @token.create! @params, :store
|
24
|
+
|
25
|
+
response[:'retorno-token'][:token][:'dados-token'][:'codigo-token'].should_not be_nil
|
26
|
+
response[:'retorno-token'][:token][:'dados-token'][:'numero-cartao-truncadov'].should_not be_nil
|
27
|
+
|
28
|
+
# Respose type
|
29
|
+
# {:"retorno-token"=>{:token=>{:"dados-token"=>{:"codigo-token"=>"2ta/YqYaeyolf2NHkBWO8grPqZE44j3PvRAQxVQQGgE=", :status=>"1", :"numero-cartao-truncado"=>"401288******1881"}}}}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,227 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Cielo::Transaction do
|
5
|
+
let(:default_params) { {:numero => "1", :valor => "100", :bandeira => "visa", :"url-retorno" => "http://some.thing.com"} }
|
6
|
+
let(:card_params) { { :cartao_numero => '4012888888881881', :cartao_validade => '201508', :cartao_indicador => '1', :cartao_seguranca => '973', :cartao_portador => 'Nome portador' } }
|
7
|
+
let(:card_token_params) { { :cartao_numero => '4012888888881881', :cartao_validade => '201508', :cartao_portador => 'Nome portador' } }
|
8
|
+
let(:authentication_card_params){ { :cartao_numero => '5453010000066167', :cartao_validade => '201805', :cartao_seguranca => "123", :cartao_portador => "Nome portador" }}
|
9
|
+
|
10
|
+
before do
|
11
|
+
@transaction = Cielo::Transaction.new
|
12
|
+
@token = Cielo::Token.new
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "create a buy page store transaction with token" do
|
16
|
+
before do
|
17
|
+
Cielo.stub(:numero_afiliacao).and_return('1006993069')
|
18
|
+
Cielo.stub(:chave_acesso).and_return('25fbb99741c739dd84d7b06ec78c9bac718838630f30b112d033ce2e621b34f3')
|
19
|
+
|
20
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
21
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><retorno-token versao=\"1.2.1\" id=\"57239017\" xmlns=\"http://ecommerce.cbmp.com.br\"><token><dados-token><codigo-token>TuS6LeBHWjqFFtE7S3zR052Jl/KUlD+tYJFpAdlA87E=</codigo-token><status>1</status><numero-cartao-truncado>455187******0183</numero-cartao-truncado></dados-token></token></retorno-token>", :content_type => "application/xml")
|
22
|
+
|
23
|
+
response = @token.create! card_token_params, :store
|
24
|
+
token = response[:"retorno-token"][:token][:"dados-token"][:"codigo-token"]
|
25
|
+
|
26
|
+
@params = default_params.merge(:token => token, :autorizar => 3)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'delivers an successful message' do
|
30
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
31
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><transacao versao=\"1.2.1\" id=\"1385758302\" xmlns=\"http://ecommerce.cbmp.com.br\"><tid>10069930690BB0381001</tid><pan>52WC7RsmcNuEUSjrYWAEhCOjoLMnMCm4KMTQBqN7PdM=</pan><dados-pedido><numero>1</numero><valor>100</valor><moeda>986</moeda><data-hora>2013-11-29T18:51:43.854-02:00</data-hora><idioma>PT</idioma><taxa-embarque>0</taxa-embarque></dados-pedido><forma-pagamento><bandeira>visa</bandeira><produto>1</produto><parcelas>1</parcelas></forma-pagamento><status>6</status><autenticacao><codigo>6</codigo><mensagem>Transacao sem autenticacao</mensagem><data-hora>2013-11-29T18:51:43.865-02:00</data-hora><valor>100</valor><eci>7</eci></autenticacao><autorizacao><codigo>6</codigo><mensagem>Transa??o autorizada</mensagem><data-hora>2013-11-29T18:51:43.869-02:00</data-hora><valor>100</valor><lr>00</lr><arp>123456</arp><nsu>766008</nsu></autorizacao><captura><codigo>6</codigo><mensagem>Transacao capturada com sucesso</mensagem><data-hora>2013-11-29T18:51:44.006-02:00</data-hora><valor>100</valor></captura></transacao>", :content_type => "application/xml")
|
32
|
+
|
33
|
+
response = @transaction.create! @params, :store
|
34
|
+
|
35
|
+
# 7 is when transactions was not autenticated
|
36
|
+
response[:transacao][:autenticacao][:eci].should eq("7")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "create a recurring transaction with token" do
|
41
|
+
before do
|
42
|
+
Cielo.stub(:numero_afiliacao).and_return('1006993069')
|
43
|
+
Cielo.stub(:chave_acesso).and_return('25fbb99741c739dd84d7b06ec78c9bac718838630f30b112d033ce2e621b34f3')
|
44
|
+
|
45
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
46
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><retorno-token versao=\"1.2.1\" id=\"57239017\" xmlns=\"http://ecommerce.cbmp.com.br\"><token><dados-token><codigo-token>TuS6LeBHWjqFFtE7S3zR052Jl/KUlD+tYJFpAdlA87E=</codigo-token><status>1</status><numero-cartao-truncado>455187******0183</numero-cartao-truncado></dados-token></token></retorno-token>", :content_type => "application/xml")
|
47
|
+
|
48
|
+
response = @token.create! card_token_params, :store
|
49
|
+
token = response[:"retorno-token"][:token][:"dados-token"][:"codigo-token"]
|
50
|
+
|
51
|
+
# #autorizar => 4 indicates recurring transaction
|
52
|
+
@params = default_params.merge(:token => token, :autorizar => 4)
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'delivers an successful message' do
|
56
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
57
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><transacao versao=\"1.2.1\" id=\"1385758302\" xmlns=\"http://ecommerce.cbmp.com.br\"><tid>10069930690BB0381001</tid><pan>52WC7RsmcNuEUSjrYWAEhCOjoLMnMCm4KMTQBqN7PdM=</pan><dados-pedido><numero>1</numero><valor>100</valor><moeda>986</moeda><data-hora>2013-11-29T18:51:43.854-02:00</data-hora><idioma>PT</idioma><taxa-embarque>0</taxa-embarque></dados-pedido><forma-pagamento><bandeira>visa</bandeira><produto>1</produto><parcelas>1</parcelas></forma-pagamento><status>6</status><autenticacao><codigo>6</codigo><mensagem>Transacao sem autenticacao</mensagem><data-hora>2013-11-29T18:51:43.865-02:00</data-hora><valor>100</valor><eci>7</eci></autenticacao><autorizacao><codigo>6</codigo><mensagem>Transa??o autorizada</mensagem><data-hora>2013-11-29T18:51:43.869-02:00</data-hora><valor>100</valor><lr>00</lr><arp>123456</arp><nsu>766008</nsu></autorizacao><captura><codigo>6</codigo><mensagem>Transacao capturada com sucesso</mensagem><data-hora>2013-11-29T18:51:44.006-02:00</data-hora><valor>100</valor></captura></transacao>", :content_type => "application/xml")
|
58
|
+
|
59
|
+
response = @transaction.create! @params, :store
|
60
|
+
|
61
|
+
# 7 is when transactions was not autenticated
|
62
|
+
response[:transacao][:autenticacao][:eci].should eq("7")
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Error on system when uses gerar-token => true (Verify with Cielo)
|
67
|
+
describe "create a buy page store transaction with token generation" do
|
68
|
+
before do
|
69
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
70
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><transacao versao=\"1.2.1\" id=\"1390315327\" xmlns=\"http://ecommerce.cbmp.com.br\"><tid>10069930690DCC341001</tid><pan>52WC7RsmcNuEUSjrYWAEhCOjoLMnMCm4KMTQBqN7PdM=</pan><dados-pedido><numero>1</numero><valor>100</valor><moeda>986</moeda><data-hora>2014-01-21T12:42:08.865-02:00</data-hora><idioma>PT</idioma><taxa-embarque>0</taxa-embarque></dados-pedido><forma-pagamento><bandeira>visa</bandeira><produto>1</produto><parcelas>1</parcelas></forma-pagamento><status>6</status><autenticacao><codigo>6</codigo><mensagem>Transacao sem autenticacao</mensagem><data-hora>2014-01-21T12:42:08.872-02:00</data-hora><valor>100</valor><eci>7</eci></autenticacao><autorizacao><codigo>6</codigo><mensagem>Transa??o autorizada</mensagem><data-hora>2014-01-21T12:42:08.885-02:00</data-hora><valor>100</valor><lr>00</lr><arp>123456</arp><nsu>904244</nsu></autorizacao><captura><codigo>6</codigo><mensagem>Transacao capturada com sucesso</mensagem><data-hora>2014-01-21T12:42:08.912-02:00</data-hora><valor>100</valor></captura><token><dados-token><codigo-token>2ta/YqYaeyolf2NHkBWO8grPqZE44j3PvRAQxVQQGgE=</codigo-token><status>1</status><numero-cartao-truncado>401288******1881</numero-cartao-truncado></dados-token></token></transacao>", :content_type => "application/xml")
|
71
|
+
|
72
|
+
Cielo.stub(:numero_afiliacao).and_return('1006993069')
|
73
|
+
Cielo.stub(:chave_acesso).and_return('25fbb99741c739dd84d7b06ec78c9bac718838630f30b112d033ce2e621b34f3')
|
74
|
+
|
75
|
+
default_params.merge!(:"gerar-token" => true, :autorizar => 3)
|
76
|
+
|
77
|
+
@params = default_params.merge(card_params)
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'delivers an successful message and have a card token' do
|
81
|
+
response = @transaction.create! @params, :store
|
82
|
+
|
83
|
+
response[:transacao][:tid].should_not be_nil
|
84
|
+
response[:transacao][:token][:"dados-token"][:"codigo-token"].should_not be_nil
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe "create a buy page store transaction" do
|
89
|
+
before do
|
90
|
+
Cielo.stub(:numero_afiliacao).and_return('1006993069')
|
91
|
+
Cielo.stub(:chave_acesso).and_return('25fbb99741c739dd84d7b06ec78c9bac718838630f30b112d033ce2e621b34f3')
|
92
|
+
|
93
|
+
@params = default_params.merge(card_params)
|
94
|
+
end
|
95
|
+
|
96
|
+
[:cartao_portador, :cartao_numero, :cartao_validade, :cartao_seguranca, :numero, :valor, :bandeira, :"url-retorno"].each do |parameter|
|
97
|
+
it "raises an error when #{parameter} isn't informed" do
|
98
|
+
lambda { @transaction.create!(@params.except!(parameter), :store) }.should raise_error(Cielo::MissingArgumentError)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'delivers an successful message' do
|
103
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
104
|
+
:body => "<?xml version='1.0' encoding='ISO-8859-1'?><transacao versao='1.2.1' id='1385759313' xmlns='http://ecommerce.cbmp.com.br'><tid>10069930690BB0441001</tid><pan>52WC7RsmcNuEUSjrYWAEhCOjoLMnMCm4KMTQBqN7PdM=</pan><dados-pedido><numero>1</numero><valor>100</valor><moeda>986</moeda><data-hora>2013-11-29T19:08:34.048-02:00</data-hora><idioma>PT</idioma><taxa-embarque>0</taxa-embarque></dados-pedido><forma-pagamento><bandeira>visa</bandeira><produto>1</produto><parcelas>1</parcelas></forma-pagamento><status>0</status><url-autenticacao>https://ecommerce.cielo.com.br/web/index.cbmp?id=55152147c2c9e44c340cb4e50d171e37</url-autenticacao></transacao>", :content_type => "application/xml")
|
105
|
+
|
106
|
+
response = @transaction.create! @params, :store
|
107
|
+
|
108
|
+
response[:transacao][:tid].should_not be_nil
|
109
|
+
response[:transacao][:"url-autenticacao"].should_not be_nil
|
110
|
+
|
111
|
+
response = @transaction.catch!("1001734898056B3C1001")
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
describe "create a buy page cielo transaction" do
|
116
|
+
before do
|
117
|
+
@params = default_params
|
118
|
+
end
|
119
|
+
[:numero, :valor, :bandeira, :"url-retorno"].each do |parameter|
|
120
|
+
it "raises an error when #{parameter} isn't informed" do
|
121
|
+
lambda { @transaction.create! @params.except!(parameter) }.should raise_error(Cielo::MissingArgumentError)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
it "delivers an successful message" do
|
126
|
+
response = @transaction.create! @params
|
127
|
+
|
128
|
+
response[:transacao][:tid].should_not be_nil
|
129
|
+
response[:transacao][:"url-autenticacao"].should_not be_nil
|
130
|
+
|
131
|
+
response = @transaction.catch!("1001734898056B3C1001")
|
132
|
+
|
133
|
+
end
|
134
|
+
|
135
|
+
it "delivers a response with error message when status isn't 200" do
|
136
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
137
|
+
:body => "Nothing to be found 'round here",
|
138
|
+
:status => ["404", "Not Found"])
|
139
|
+
response = @transaction.create! @params
|
140
|
+
|
141
|
+
response[:erro].should_not be_nil
|
142
|
+
response[:erro][:codigo].should be_eql("000")
|
143
|
+
end
|
144
|
+
|
145
|
+
it "delivers a response with error message when the server send" do
|
146
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
147
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> <erro xmlns=\"http://ecommerce.cbmp.com.br\"> <codigo>001</codigo> <mensagem>Requisição inválida</mensagem> </erro>", :content_type => "application/xml")
|
148
|
+
response = @transaction.create! @params
|
149
|
+
|
150
|
+
response[:erro].should_not be_nil
|
151
|
+
response[:erro][:codigo].should be_eql("001")
|
152
|
+
end
|
153
|
+
|
154
|
+
end
|
155
|
+
|
156
|
+
describe "Verify a transaction status" do
|
157
|
+
it "returns null when no tid is informed" do
|
158
|
+
@transaction.verify!(nil).should be_nil
|
159
|
+
end
|
160
|
+
it "returns a successfull message" do
|
161
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
162
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<transacao id=\"1308170973\" versao=\"1.1.0\" xmlns=\"http://ecommerce.cbmp.com.br\">\n <tid>1001734898056B3C1001</tid>\n <dados-pedido>\n <numero>1</numero>\n <valor>100</valor>\n <moeda>986</moeda>\n <data-hora>2011-06-15T18:45:16.705-02:00</data-hora>\n <idioma>PT</idioma>\n </dados-pedido>\n <forma-pagamento>\n <bandeira>visa</bandeira>\n <produto>1</produto>\n <parcelas>1</parcelas>\n </forma-pagamento>\n <status>0</status>\n</transacao>\n\n", :content_type => "application/xml")
|
163
|
+
|
164
|
+
response = @transaction.verify!("1001734898056B3C1001")
|
165
|
+
|
166
|
+
response[:transacao][:tid].should_not be_nil
|
167
|
+
response[:transacao][:status].should_not be_nil
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
describe "Catch a transaction" do
|
172
|
+
it "returns null when no tid is informed" do
|
173
|
+
@transaction.catch!(nil).should be_nil
|
174
|
+
end
|
175
|
+
it "returns a successfull message" do
|
176
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
177
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<transacao id=\"1308170973\" versao=\"1.1.0\" xmlns=\"http://ecommerce.cbmp.com.br\">\n <tid>1001734898056B3C1001</tid>\n <dados-pedido>\n <numero>1</numero>\n <valor>100</valor>\n <moeda>986</moeda>\n <data-hora>2011-06-15T18:45:16.705-02:00</data-hora>\n <idioma>PT</idioma>\n </dados-pedido>\n <forma-pagamento>\n <bandeira>visa</bandeira>\n <produto>1</produto>\n <parcelas>1</parcelas>\n </forma-pagamento>\n <status>0</status>\n</transacao>\n\n", :content_type => "application/xml")
|
178
|
+
|
179
|
+
response = @transaction.catch!("1001734898056B3C1001")
|
180
|
+
|
181
|
+
response[:transacao][:tid].should_not be_nil
|
182
|
+
response[:transacao][:status].should_not be_nil
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
describe "Cancel a transaction" do
|
187
|
+
it "returns null when no tid is informed" do
|
188
|
+
@transaction.cancel!(nil).should be_nil
|
189
|
+
end
|
190
|
+
it "returns a successfull message" do
|
191
|
+
FakeWeb.register_uri(:any, "https://ecommerce.cielo.com.br/servicos/ecommwsec.do",
|
192
|
+
:body => "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<transacao id=\"1308170973\" versao=\"1.1.0\" xmlns=\"http://ecommerce.cbmp.com.br\">\n <tid>1001734898056B3C1001</tid>\n <dados-pedido>\n <numero>1</numero>\n <valor>100</valor>\n <moeda>986</moeda>\n <data-hora>2011-06-15T18:45:16.705-02:00</data-hora>\n <idioma>PT</idioma>\n </dados-pedido>\n <forma-pagamento>\n <bandeira>visa</bandeira>\n <produto>1</produto>\n <parcelas>1</parcelas>\n </forma-pagamento>\n <status>0</status>\n</transacao>\n\n", :content_type => "application/xml")
|
193
|
+
|
194
|
+
response = @transaction.cancel!("1001734898056B3C1001")
|
195
|
+
|
196
|
+
response[:transacao][:tid].should_not be_nil
|
197
|
+
response[:transacao][:status].should_not be_nil
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
describe "Using a production environment" do
|
202
|
+
before do
|
203
|
+
Cielo.setup do |config|
|
204
|
+
config.environment = :production
|
205
|
+
config.numero_afiliacao = "1001734891"
|
206
|
+
config.chave_acesso="e84827130b9837473681c2787007da5914d6359947015a5cdb2b8843db0fa832"
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
it "must use the production environment" do
|
211
|
+
Cielo.numero_afiliacao.should be_eql "1001734891"
|
212
|
+
end
|
213
|
+
|
214
|
+
it "must use the production client number" do
|
215
|
+
@connection = Cielo::Connection.new
|
216
|
+
@connection.numero_afiliacao.should be_eql "1001734891"
|
217
|
+
end
|
218
|
+
|
219
|
+
it "must use the configuration informed" do
|
220
|
+
@connection2 = Cielo::Connection.new "0100100100", "e84827130b9837473681c2787007da5914d6359947015a5cdb2b8843db0fa800"
|
221
|
+
@connection2.numero_afiliacao.should be_eql "0100100100"
|
222
|
+
@connection2.chave_acesso.should be_eql "e84827130b9837473681c2787007da5914d6359947015a5cdb2b8843db0fa800"
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cielo_old
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ilton
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.7
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.7
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: i18n
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: builder
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.0.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: watir-webdriver
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: shoulda
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jeweler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
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
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: fakeweb
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: Integração com a cielo
|
140
|
+
email: ton.garcia.jr@gmail.com
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files:
|
144
|
+
- LICENSE.txt
|
145
|
+
- README.rdoc
|
146
|
+
files:
|
147
|
+
- ".document"
|
148
|
+
- ".travis.yml"
|
149
|
+
- Gemfile
|
150
|
+
- Gemfile.lock
|
151
|
+
- LICENSE.txt
|
152
|
+
- README.rdoc
|
153
|
+
- Rakefile
|
154
|
+
- cielo-0.2.5.gem
|
155
|
+
- cielo.gemspec
|
156
|
+
- lib/cielo.rb
|
157
|
+
- lib/cielo/connection.rb
|
158
|
+
- lib/cielo/string.rb
|
159
|
+
- lib/cielo/token.rb
|
160
|
+
- lib/cielo/transaction.rb
|
161
|
+
- lib/cielo/version.rb
|
162
|
+
- lib/generators/cielo/install_generator.rb
|
163
|
+
- lib/generators/templates/cielo.rb
|
164
|
+
- spec/cielo/connection_spec.rb
|
165
|
+
- spec/cielo/token_spec.rb
|
166
|
+
- spec/cielo/transaction_spec.rb
|
167
|
+
- spec/spec_helper.rb
|
168
|
+
homepage:
|
169
|
+
licenses:
|
170
|
+
- MIT
|
171
|
+
metadata: {}
|
172
|
+
post_install_message:
|
173
|
+
rdoc_options: []
|
174
|
+
require_paths:
|
175
|
+
- lib
|
176
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '0'
|
186
|
+
requirements: []
|
187
|
+
rubyforge_project:
|
188
|
+
rubygems_version: 2.4.8
|
189
|
+
signing_key:
|
190
|
+
specification_version: 4
|
191
|
+
summary: Integração com a cielo
|
192
|
+
test_files: []
|