rack-webmoney 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rack/webmoney.rb +21 -20
- data/rack-webmoney.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/rack/webmoney.rb
CHANGED
@@ -207,32 +207,33 @@ module Rack #:nodoc:
|
|
207
207
|
}
|
208
208
|
|
209
209
|
begin
|
210
|
-
soap_client = Savon::Client.new "https://login.wmtransfer.com"
|
210
|
+
soap_client = Savon::Client.new "https://login.wmtransfer.com/ws/Security.asmx"
|
211
211
|
response = soap_client.authorize! do |soap| # (!) disable WSDL
|
212
|
-
soap.namespace = "
|
212
|
+
soap.namespace = "http://WmLogin.webmoney.ru/"
|
213
|
+
soap.action = "http://WmLogin.webmoney.ru/Authorize"
|
213
214
|
soap.body = check_req_params
|
214
|
-
end.to_hash[
|
215
|
+
end.to_hash[:authorize_response][:authorize_result]
|
215
216
|
rescue Errno::ECONNRESET, Errno::ECONNREFUSED, Timeout::Error
|
216
|
-
response = -2
|
217
|
+
response = '-2'
|
217
218
|
end
|
218
219
|
|
219
220
|
status = case response
|
220
|
-
when 0
|
221
|
-
when -2 then :server_not_available
|
222
|
-
when -1 then :internal_error
|
223
|
-
when 1 then :invalid_arguments
|
224
|
-
when 2 then :ticket_invalid
|
225
|
-
when 3 then :ticket_expired
|
226
|
-
when 4 then :user_not_found
|
227
|
-
when 5 then :holder_not_found
|
228
|
-
when 6 then :website_not_found
|
229
|
-
when 7 then :url_not_found
|
230
|
-
when 8 then :settings_not_found
|
231
|
-
when 9 then :invalid_password
|
232
|
-
when 10 then :not_trusted
|
233
|
-
when 11 then :pwd_access_blocked
|
234
|
-
when 12 then :user_blocked
|
235
|
-
when 201 then :ip_differs
|
221
|
+
when '0' then :successful
|
222
|
+
when '-2' then :server_not_available
|
223
|
+
when '-1' then :internal_error
|
224
|
+
when '1' then :invalid_arguments
|
225
|
+
when '2' then :ticket_invalid
|
226
|
+
when '3' then :ticket_expired
|
227
|
+
when '4' then :user_not_found
|
228
|
+
when '5' then :holder_not_found
|
229
|
+
when '6' then :website_not_found
|
230
|
+
when '7' then :url_not_found
|
231
|
+
when '8' then :settings_not_found
|
232
|
+
when '9' then :invalid_password
|
233
|
+
when '10' then :not_trusted
|
234
|
+
when '11' then :pwd_access_blocked
|
235
|
+
when '12' then :user_blocked
|
236
|
+
when '201' then :ip_differs
|
236
237
|
else
|
237
238
|
"Unknown response code(#{response})"
|
238
239
|
end
|
data/rack-webmoney.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rack-webmoney}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Anton Orel", "Alexander Orel"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-03}
|
13
13
|
s.description = %q{Rack webmoney authentication}
|
14
14
|
s.email = ["eagle.anton@gmail.com", "eagle.alex@gmail.com"]
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Anton Orel
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-03 00:00:00 +04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|