pagseguro 0.1.1 → 0.1.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/Gemfile +8 -1
- data/Gemfile.lock +7 -0
- data/lib/pagseguro/rake.rb +11 -2
- data/lib/pagseguro/version.rb +1 -1
- data/pagseguro.gemspec +1 -1
- data/spec/support/log/test.log +44 -0
- metadata +6 -2
data/Gemfile
CHANGED
@@ -4,6 +4,13 @@ gem "rails", "3.0.1"
|
|
4
4
|
gem "fakeweb"
|
5
5
|
gem "rspec-rails", "2.0.1"
|
6
6
|
gem "faker"
|
7
|
-
gem "ruby-debug19", :require => false
|
8
7
|
gem "nokogiri"
|
9
8
|
gem "sqlite3-ruby"
|
9
|
+
|
10
|
+
platforms :mri_19 do
|
11
|
+
gem "ruby-debug19", :require => "ruby-debug"
|
12
|
+
end
|
13
|
+
|
14
|
+
platforms :mri_18 do
|
15
|
+
gem "ruby-debug"
|
16
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -39,6 +39,7 @@ GEM
|
|
39
39
|
faker (0.3.1)
|
40
40
|
fakeweb (1.3.0)
|
41
41
|
i18n (0.4.1)
|
42
|
+
linecache (0.43)
|
42
43
|
linecache19 (0.5.11)
|
43
44
|
ruby_core_source (>= 0.1.4)
|
44
45
|
mail (2.2.7)
|
@@ -79,6 +80,11 @@ GEM
|
|
79
80
|
rspec-expectations (= 2.0.0)
|
80
81
|
rspec-rails (2.0.1)
|
81
82
|
rspec (~> 2.0.0)
|
83
|
+
ruby-debug (0.10.3)
|
84
|
+
columnize (>= 0.1)
|
85
|
+
ruby-debug-base (~> 0.10.3.0)
|
86
|
+
ruby-debug-base (0.10.3)
|
87
|
+
linecache (>= 0.3)
|
82
88
|
ruby-debug-base19 (0.11.24)
|
83
89
|
columnize (>= 0.3.1)
|
84
90
|
linecache19 (>= 0.5.11)
|
@@ -104,5 +110,6 @@ DEPENDENCIES
|
|
104
110
|
nokogiri
|
105
111
|
rails (= 3.0.1)
|
106
112
|
rspec-rails (= 2.0.1)
|
113
|
+
ruby-debug
|
107
114
|
ruby-debug19
|
108
115
|
sqlite3-ruby
|
data/lib/pagseguro/rake.rb
CHANGED
@@ -89,9 +89,18 @@ module PagSeguro
|
|
89
89
|
# Set note
|
90
90
|
order["Anotacao"] = ENV["NOTE"].to_s
|
91
91
|
|
92
|
+
# Retrieve index
|
93
|
+
index = proc do |hash, value|
|
94
|
+
if hash.respond_to?(:key)
|
95
|
+
hash.key(value)
|
96
|
+
else
|
97
|
+
hash.index(value)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
92
101
|
# Set payment method and status
|
93
|
-
order["TipoPagamento"] = PagSeguro::Notification::PAYMENT_METHOD
|
94
|
-
order["StatusTransacao"] = PagSeguro::Notification::STATUS
|
102
|
+
order["TipoPagamento"] = index[PagSeguro::Notification::PAYMENT_METHOD, payment_method]
|
103
|
+
order["StatusTransacao"] = index[PagSeguro::Notification::STATUS, status]
|
95
104
|
|
96
105
|
# Finally, ping the configured return URL
|
97
106
|
uri = URI.parse File.join(PagSeguro.config["base"], PagSeguro.config["return_to"])
|
data/lib/pagseguro/version.rb
CHANGED
data/pagseguro.gemspec
CHANGED
data/spec/support/log/test.log
CHANGED
@@ -53,3 +53,47 @@ Completed 302 Found in 2ms
|
|
53
53
|
Parameters: {"ref_transacao"=>"I1001"}
|
54
54
|
Redirected to http://test.host/invoices/confirmation
|
55
55
|
Completed 302 Found in 1ms
|
56
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
57
|
+
Redirected to http://test.host/invoices/confirmation
|
58
|
+
Completed 302 Found in 2ms
|
59
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
60
|
+
Parameters: {"email_cobranca"=>"john@doe.com", "ref_transacao"=>"I1001"}
|
61
|
+
Redirected to http://test.host/invoices/confirmation
|
62
|
+
Completed 302 Found in 2ms
|
63
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
64
|
+
Parameters: {"ref_transacao"=>"I1001"}
|
65
|
+
Redirected to http://test.host/invoices/confirmation
|
66
|
+
Completed 302 Found in 1ms
|
67
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
68
|
+
Redirected to http://test.host/invoices/confirmation
|
69
|
+
Completed 302 Found in 2ms
|
70
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
71
|
+
Parameters: {"email_cobranca"=>"john@doe.com", "ref_transacao"=>"I1001"}
|
72
|
+
Redirected to http://test.host/invoices/confirmation
|
73
|
+
Completed 302 Found in 1ms
|
74
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
75
|
+
Parameters: {"ref_transacao"=>"I1001"}
|
76
|
+
Redirected to http://test.host/invoices/confirmation
|
77
|
+
Completed 302 Found in 2ms
|
78
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
79
|
+
Redirected to http://test.host/invoices/confirmation
|
80
|
+
Completed 302 Found in 2ms
|
81
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
82
|
+
Parameters: {"ref_transacao"=>"I1001", "email_cobranca"=>"john@doe.com"}
|
83
|
+
Redirected to http://test.host/invoices/confirmation
|
84
|
+
Completed 302 Found in 2ms
|
85
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
86
|
+
Parameters: {"ref_transacao"=>"I1001"}
|
87
|
+
Redirected to http://test.host/invoices/confirmation
|
88
|
+
Completed 302 Found in 1ms
|
89
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
90
|
+
Redirected to http://test.host/invoices/confirmation
|
91
|
+
Completed 302 Found in 2ms
|
92
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
93
|
+
Parameters: {"ref_transacao"=>"I1001", "email_cobranca"=>"john@doe.com"}
|
94
|
+
Redirected to http://test.host/invoices/confirmation
|
95
|
+
Completed 302 Found in 2ms
|
96
|
+
Processing by PagSeguro::DeveloperController#create as HTML
|
97
|
+
Parameters: {"ref_transacao"=>"I1001"}
|
98
|
+
Redirected to http://test.host/invoices/confirmation
|
99
|
+
Completed 302 Found in 2ms
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagseguro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Nando Vieira
|
@@ -25,6 +26,7 @@ dependencies:
|
|
25
26
|
requirements:
|
26
27
|
- - ">="
|
27
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
28
30
|
segments:
|
29
31
|
- 2
|
30
32
|
- 0
|
@@ -95,6 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
95
97
|
requirements:
|
96
98
|
- - ">="
|
97
99
|
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
98
101
|
segments:
|
99
102
|
- 0
|
100
103
|
version: "0"
|
@@ -103,6 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
106
|
requirements:
|
104
107
|
- - ">="
|
105
108
|
- !ruby/object:Gem::Version
|
109
|
+
hash: 3
|
106
110
|
segments:
|
107
111
|
- 0
|
108
112
|
version: "0"
|