rack-webmoney 0.0.3 → 0.0.4
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/README.rdoc +3 -3
- data/VERSION +1 -1
- data/lib/rack/webmoney.rb +2 -2
- data/rack-webmoney.gemspec +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -14,7 +14,7 @@ application.rb
|
|
14
14
|
|
15
15
|
...
|
16
16
|
config.middleware.insert_before(Warden::Manager, Rack::Webmoney,
|
17
|
-
:credentials => {:
|
17
|
+
:credentials => {:app_rids => { 'example.com' => 'your_site_rid' }, :site_holder_wmid => 'your_site_holder_wmid'},
|
18
18
|
:mode => Rails.env)
|
19
19
|
...
|
20
20
|
|
@@ -32,7 +32,7 @@ application.rb
|
|
32
32
|
end
|
33
33
|
}
|
34
34
|
|
35
|
-
use Rack::Webmoney, :credentials => {:
|
35
|
+
use Rack::Webmoney, :credentials => {:app_rids => { 'example.com' => 'your_site_rid' }, :site_holder_wmid => 'your_site_holder_wmid'}, :mode => "development_OR_test_FOR_TESTING"
|
36
36
|
run MyApp
|
37
37
|
|
38
38
|
=== Sinatra Example
|
@@ -41,7 +41,7 @@ application.rb
|
|
41
41
|
use Rack::Session::Cookie
|
42
42
|
|
43
43
|
require 'rack/webmoney'
|
44
|
-
use Rack::Webmoney, :credentials => {:
|
44
|
+
use Rack::Webmoney, :credentials => {:app_rids => { 'example.com' => 'your_site_rid' }, :site_holder_wmid => 'your_site_holder_wmid'}, :mode => "development_OR_test_FOR_TESTING"
|
45
45
|
|
46
46
|
get '/login' do
|
47
47
|
erb :login
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/lib/rack/webmoney.rb
CHANGED
@@ -173,7 +173,7 @@ module Rack #:nodoc:
|
|
173
173
|
|
174
174
|
raise RuntimeError, "Rack::Webmoney requires a session" unless session
|
175
175
|
|
176
|
-
redirect_to "https://login.wmtransfer.com/GateKeeper.aspx?RID=#{credentials[:
|
176
|
+
redirect_to "https://login.wmtransfer.com/GateKeeper.aspx?RID=#{credentials[:app_rids][req.host]}"
|
177
177
|
end
|
178
178
|
|
179
179
|
def complete_authentication(env)
|
@@ -212,7 +212,7 @@ module Rack #:nodoc:
|
|
212
212
|
soap.namespace = "https://login.wmtransfer.com/ws/Security.asmx?WSDL"
|
213
213
|
soap.body = check_req_params
|
214
214
|
end.to_hash['authorizeResult'].to_i
|
215
|
-
rescue
|
215
|
+
rescue Errno::ECONNRESET, Errno::ECONNREFUSED, Timeout::Error
|
216
216
|
response = -2
|
217
217
|
end
|
218
218
|
|
data/rack-webmoney.gemspec
CHANGED