sisow 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -2
- data/.rvmrc +1 -0
- data/Gemfile.lock +46 -0
- data/README.rdoc +5 -2
- data/lib/sisow/payment.rb +14 -3
- data/lib/sisow/version.rb +1 -1
- data/script/bundler +10 -0
- data/script/ci +14 -0
- data/sisow.gemspec +1 -0
- data/spec/models/ideal_payment_spec.rb +6 -0
- data/spec/spec_helper.rb +9 -1
- metadata +118 -77
data/.gitignore
CHANGED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm 1.9.3-p194@sisow
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sisow (0.9.3)
|
5
|
+
hashie
|
6
|
+
httparty
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
diff-lcs (1.1.3)
|
12
|
+
fakeweb (1.3.0)
|
13
|
+
hashie (1.2.0)
|
14
|
+
httparty (0.8.3)
|
15
|
+
multi_json (~> 1.0)
|
16
|
+
multi_xml
|
17
|
+
multi_json (1.3.5)
|
18
|
+
multi_xml (0.5.1)
|
19
|
+
rake (0.9.2.2)
|
20
|
+
rspec (2.10.0)
|
21
|
+
rspec-core (~> 2.10.0)
|
22
|
+
rspec-expectations (~> 2.10.0)
|
23
|
+
rspec-mocks (~> 2.10.0)
|
24
|
+
rspec-core (2.10.0)
|
25
|
+
rspec-expectations (2.10.0)
|
26
|
+
diff-lcs (~> 1.1.3)
|
27
|
+
rspec-mocks (2.10.1)
|
28
|
+
simplecov (0.6.4)
|
29
|
+
multi_json (~> 1.0)
|
30
|
+
simplecov-html (~> 0.5.3)
|
31
|
+
simplecov-html (0.5.3)
|
32
|
+
simplecov-rcov (0.2.3)
|
33
|
+
simplecov (>= 0.4.1)
|
34
|
+
vcr (2.1.1)
|
35
|
+
|
36
|
+
PLATFORMS
|
37
|
+
ruby
|
38
|
+
|
39
|
+
DEPENDENCIES
|
40
|
+
fakeweb
|
41
|
+
rake
|
42
|
+
rspec
|
43
|
+
simplecov
|
44
|
+
simplecov-rcov
|
45
|
+
sisow!
|
46
|
+
vcr
|
data/README.rdoc
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
= Sisow
|
2
2
|
{<img src="https://secure.travis-ci.org/marceldegraaf/sisow.png" />}[http://travis-ci.org/marceldegraaf/sisow]
|
3
3
|
|
4
|
-
*
|
4
|
+
*WARNING* There is an issue in the <tt>httparty</tt> gem that breaks the <tt>debug_mode</tt> of this Sisow gem. The only work-around at this time is to not enable <tt>debug_mode</tt>. I'll keep an eye on the <tt>httparty</tt> issue and update the Readme if anything changes. Sorry for the inconvenience.
|
5
|
+
|
6
|
+
-------
|
5
7
|
|
6
8
|
This gem provides an interface to interact with the Sisow payment provider. Sisow offers payments through the iDeal (Dutch),
|
7
9
|
Bancontact/Mister Cash (Belgian) and Sofort (German) online payment systems.
|
@@ -66,7 +68,8 @@ Setting up a payment looks like this:
|
|
66
68
|
}
|
67
69
|
|
68
70
|
payment = Sisow::IdealPayment.new(payment_attributes)
|
69
|
-
redirect_url
|
71
|
+
redirect_url = payment.payment_url
|
72
|
+
transaction_id = payment.transaction_id # this value corresponds with Sisow's "trxid"
|
70
73
|
|
71
74
|
=== Supported payment methods
|
72
75
|
|
data/lib/sisow/payment.rb
CHANGED
@@ -18,12 +18,13 @@ module Sisow
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def payment_url
|
21
|
-
request = Sisow::Api::TransactionRequest.new(self)
|
22
|
-
response = request.perform
|
23
|
-
|
24
21
|
CGI::unescape(response.issuerurl) if response.issuerurl?
|
25
22
|
end
|
26
23
|
|
24
|
+
def transaction_id
|
25
|
+
response.trxid if response.trxid?
|
26
|
+
end
|
27
|
+
|
27
28
|
def shop_id
|
28
29
|
Sisow.configuration.shop_id
|
29
30
|
end
|
@@ -36,5 +37,15 @@ module Sisow
|
|
36
37
|
|
37
38
|
def payment_method; raise 'Implement me in a subclass'; end
|
38
39
|
|
40
|
+
private
|
41
|
+
|
42
|
+
def response
|
43
|
+
@raw_response ||= request.perform
|
44
|
+
end
|
45
|
+
|
46
|
+
def request
|
47
|
+
@request ||= Sisow::Api::TransactionRequest.new(self)
|
48
|
+
end
|
49
|
+
|
39
50
|
end
|
40
51
|
end
|
data/lib/sisow/version.rb
CHANGED
data/script/bundler
ADDED
data/script/ci
ADDED
data/sisow.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
require 'bundler/setup'
|
2
2
|
require 'simplecov'
|
3
|
-
|
3
|
+
require 'simplecov-rcov'
|
4
|
+
|
5
|
+
SimpleCov.start do
|
6
|
+
add_filter 'vendor'
|
7
|
+
end
|
8
|
+
|
9
|
+
if ENV['BUILD_NUMBER'] && ENV['BUILD_ID']
|
10
|
+
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
|
11
|
+
end
|
4
12
|
|
5
13
|
require 'vcr_setup'
|
6
14
|
|
metadata
CHANGED
@@ -1,97 +1,140 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sisow
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.4
|
4
5
|
prerelease:
|
5
|
-
version: 0.9.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Marcel de Graaf
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-06-04 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: httparty
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
25
22
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: hashie
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
25
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: hashie
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
36
38
|
type: :runtime
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: rspec
|
40
39
|
prerelease: false
|
41
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
47
54
|
type: :development
|
48
|
-
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: vcr
|
51
55
|
prerelease: false
|
52
|
-
|
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: vcr
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
53
65
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version:
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
58
70
|
type: :development
|
59
|
-
version_requirements: *id004
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: fakeweb
|
62
71
|
prerelease: false
|
63
|
-
|
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: fakeweb
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
64
81
|
none: false
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version:
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
69
86
|
type: :development
|
70
|
-
|
71
|
-
|
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
|
72
95
|
name: simplecov
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
73
103
|
prerelease: false
|
74
|
-
|
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: simplecov-rcov
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
75
113
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version:
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
80
118
|
type: :development
|
81
|
-
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
82
126
|
description: This gem implements the REST API of the Sisow payment provider.
|
83
|
-
email:
|
127
|
+
email:
|
84
128
|
- mail@marceldegraaf.net
|
85
129
|
executables: []
|
86
|
-
|
87
130
|
extensions: []
|
88
|
-
|
89
131
|
extra_rdoc_files: []
|
90
|
-
|
91
|
-
files:
|
132
|
+
files:
|
92
133
|
- .gitignore
|
134
|
+
- .rvmrc
|
93
135
|
- .travis.yml
|
94
136
|
- Gemfile
|
137
|
+
- Gemfile.lock
|
95
138
|
- README.rdoc
|
96
139
|
- Rakefile
|
97
140
|
- lib/sisow.rb
|
@@ -112,6 +155,8 @@ files:
|
|
112
155
|
- lib/sisow/payment/sofort_payment.rb
|
113
156
|
- lib/sisow/ping.rb
|
114
157
|
- lib/sisow/version.rb
|
158
|
+
- script/bundler
|
159
|
+
- script/ci
|
115
160
|
- sisow.gemspec
|
116
161
|
- spec/models/bancontact_payment_spec.rb
|
117
162
|
- spec/models/callback_spec.rb
|
@@ -129,35 +174,31 @@ files:
|
|
129
174
|
- spec/sisow.yml.example
|
130
175
|
- spec/spec_helper.rb
|
131
176
|
- spec/vcr_setup.rb
|
132
|
-
has_rdoc: true
|
133
177
|
homepage: http://github.com/marceldegraaf/sisow
|
134
178
|
licenses: []
|
135
|
-
|
136
179
|
post_install_message:
|
137
180
|
rdoc_options: []
|
138
|
-
|
139
|
-
require_paths:
|
181
|
+
require_paths:
|
140
182
|
- lib
|
141
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
183
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
184
|
none: false
|
143
|
-
requirements:
|
144
|
-
- -
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
version:
|
147
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ! '>='
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
190
|
none: false
|
149
|
-
requirements:
|
150
|
-
- -
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version:
|
191
|
+
requirements:
|
192
|
+
- - ! '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
153
195
|
requirements: []
|
154
|
-
|
155
196
|
rubyforge_project: sisow
|
156
|
-
rubygems_version: 1.
|
197
|
+
rubygems_version: 1.8.24
|
157
198
|
signing_key:
|
158
199
|
specification_version: 3
|
159
200
|
summary: Rails gem for payments through Sisow.
|
160
|
-
test_files:
|
201
|
+
test_files:
|
161
202
|
- spec/models/bancontact_payment_spec.rb
|
162
203
|
- spec/models/callback_spec.rb
|
163
204
|
- spec/models/configuration_spec.rb
|