omni_kassa 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d546a263a0eaf9f3f1e4590da333f59b6ef21d33
4
+ data.tar.gz: 22e0417674cdffaeb25df9ab428020d07c2f9ac1
5
+ SHA512:
6
+ metadata.gz: 65e40c69268b321de284d12b0273b5f50e996484cb22c9f9b37f1d304244ef95920de2d4f6f88d3f120cc646e195a4396ca57c9dc8a5826fb4e2a671251fe9ae
7
+ data.tar.gz: 105c0fe86f25770cb6a33fd63c7e2b7d6b0932536238c4fe2e859e80dfc9ce1ba9463ad4114a8fb0fd090fe6136e72be835b9b5aea9e3d0f092c79e24686a293
data/Gemfile CHANGED
@@ -1,3 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
+
2
3
  gemspec
3
4
 
data/Gemfile.lock CHANGED
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omni_kassa (1.1.1)
4
+ omni_kassa (1.2.0)
5
5
  activesupport
6
6
  httparty
7
7
 
8
8
  GEM
9
- remote: http://rubygems.org/
9
+ remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (3.2.10)
11
+ activesupport (3.2.11)
12
12
  i18n (~> 0.6)
13
13
  multi_json (~> 1.0)
14
- httparty (0.9.0)
14
+ httparty (0.10.0)
15
15
  multi_json (~> 1.0)
16
16
  multi_xml
17
17
  i18n (0.6.1)
18
- minitest (4.3.3)
18
+ minitest (4.4.0)
19
19
  multi_json (1.5.0)
20
- multi_xml (0.5.1)
21
- rack (1.4.1)
20
+ multi_xml (0.5.2)
21
+ rack (1.4.3)
22
22
  rack-protection (1.3.2)
23
23
  rack
24
24
  rack-test (0.6.2)
data/README.md CHANGED
@@ -1,8 +1,13 @@
1
- OmniKassa [![Build Status](https://secure.travis-ci.org/pepijn/omni_kassa.png?branch=master)](https://travis-ci.org/pepijn/omni_kassa) [![Dependency Status](https://gemnasium.com/pepijn/omni_kassa.png)](https://gemnasium.com/pepijn/omni_kassa) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/pepijn/omni_kassa)
2
- =========
1
+ # OmniKassa
2
+ [![Gem Version](https://badge.fury.io/rb/omni_kassa.png)][gem]
3
+ [![Build Status](https://secure.travis-ci.org/pepijn/omni_kassa.png?branch=master)](https://travis-ci.org/pepijn/omni_kassa)
4
+ [![Dependency Status](https://gemnasium.com/pepijn/omni_kassa.png)](https://gemnasium.com/pepijn/omni_kassa)
5
+ [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/pepijn/omni_kassa)
3
6
 
4
7
  Easier Rabobank OmniKassa payments. Extracted from www.studysquare.nl. [RDocs](http://rdoc.info/projects/pepijn/omni_kassa).
5
8
 
9
+ [gem]: https://rubygems.org/gems/omni_kassa
10
+
6
11
  Installation
7
12
  ------------
8
13
 
@@ -20,7 +25,8 @@ OmniKassa.config(
20
25
  merchant_id: '002020000000001',
21
26
  currency_code: 978, # Euro
22
27
  url: 'https://payment-webinit.simu.omnikassa.rabobank.nl/paymentServlet',
23
- transaction_reference: lambda { |order_id| "omnikassatest#{Time.now.to_i}" }
28
+ transaction_reference: lambda { |order_id| "omnikassatest#{Time.now.to_i}" },
29
+ customer_language: :nl
24
30
  )
25
31
  ```
26
32
 
@@ -10,7 +10,9 @@ module OmniKassa
10
10
  :order_id, :amount, :normal_return_url, :key_version,
11
11
  :automatic_response_url, :customer_language
12
12
 
13
- attr_accessor *REQUIRED
13
+ OPTIONAL = :payment_mean_brand_list, :customer_language, :expiration_date
14
+
15
+ attr_accessor *REQUIRED, *OPTIONAL
14
16
 
15
17
  def initialize
16
18
  self.key_version = KEY_VERSION
@@ -51,11 +53,13 @@ module OmniKassa
51
53
  end
52
54
 
53
55
  def data_hash
54
- REQUIRED.map do |attr|
55
- value = send attr
56
- raise RequestError, "attribute '#{attr}' missing" if value.nil?
57
-
58
- [attr.to_s.camelcase(:lower), value]
56
+ REQUIRED.each do |param|
57
+ value = send param
58
+ raise RequestError, "attribute '#{param}' missing" if value.nil?
59
+ end
60
+ [OPTIONAL, REQUIRED].flatten.map do |param|
61
+ value = send param
62
+ [param.to_s.camelcase(:lower), value]
59
63
  end
60
64
  end
61
65
 
data/omni_kassa.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'omni_kassa'
3
- s.version = '1.2.0'
3
+ s.version = '1.2.1'
4
4
  s.author = 'Pepijn Looije'
5
5
  s.email = 'pepijn@plict.nl'
6
6
  s.description = s.summary = 'Easier Rabobank OmniKassa payments'
data/test/request_test.rb CHANGED
@@ -50,4 +50,12 @@ class RequestTest < MiniTest::Unit::TestCase
50
50
  def test_perform_valid
51
51
  refute_match /ERROR/, @request.perform
52
52
  end
53
+
54
+ def test_optional_params
55
+ @request.payment_mean_brand_list = 'IDEAL'
56
+
57
+ assert_equal 'IDEAL', @request.payment_mean_brand_list
58
+
59
+ assert_match /paymentMeanBrandList=IDEAL/, @request.send(:data)
60
+ end
53
61
  end
metadata CHANGED
@@ -1,110 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omni_kassa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
5
- prerelease:
4
+ version: 1.2.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Pepijn Looije
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-07 00:00:00.000000000 Z
11
+ date: 2013-05-09 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: httparty
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activesupport
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rack-test
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: minitest
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: sinatra
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  description: Easier Rabobank OmniKassa payments
@@ -115,27 +102,6 @@ extra_rdoc_files: []
115
102
  files:
116
103
  - ./app.rb
117
104
  - ./config.ru
118
- - ./doc/app_rb.html
119
- - ./doc/created.rid
120
- - ./doc/Gemfile.html
121
- - ./doc/HelloWorldTest.html
122
- - ./doc/index.html
123
- - ./doc/lib/omni_kassa/request_rb.html
124
- - ./doc/lib/omni_kassa/response_rb.html
125
- - ./doc/lib/omni_kassa_rb.html
126
- - ./doc/OmniKassa/ConfigError.html
127
- - ./doc/OmniKassa/OmniKassaError.html
128
- - ./doc/OmniKassa/Request/RequestError.html
129
- - ./doc/OmniKassa/Request.html
130
- - ./doc/OmniKassa/Response/ResponseCodeError.html
131
- - ./doc/OmniKassa/Response/SealMismatchError.html
132
- - ./doc/OmniKassa/Response.html
133
- - ./doc/OmniKassa.html
134
- - ./doc/Rakefile.html
135
- - ./doc/rdoc.css
136
- - ./doc/test/lib/omni_kassa/test_helper_rb.html
137
- - ./doc/test/omni_kassa_test_rb.html
138
- - ./doc/test_settings_rb.html
139
105
  - ./Gemfile
140
106
  - ./Gemfile.lock
141
107
  - ./lib/omni_kassa/request.rb
@@ -152,26 +118,25 @@ files:
152
118
  - ./test_settings.rb
153
119
  homepage: https://github.com/pepijn/omni_kassa
154
120
  licenses: []
121
+ metadata: {}
155
122
  post_install_message:
156
123
  rdoc_options: []
157
124
  require_paths:
158
125
  - lib
159
126
  required_ruby_version: !ruby/object:Gem::Requirement
160
- none: false
161
127
  requirements:
162
- - - ! '>='
128
+ - - '>='
163
129
  - !ruby/object:Gem::Version
164
130
  version: '1.9'
165
131
  required_rubygems_version: !ruby/object:Gem::Requirement
166
- none: false
167
132
  requirements:
168
- - - ! '>='
133
+ - - '>='
169
134
  - !ruby/object:Gem::Version
170
135
  version: '0'
171
136
  requirements: []
172
137
  rubyforge_project:
173
- rubygems_version: 1.8.24
138
+ rubygems_version: 2.0.3
174
139
  signing_key:
175
- specification_version: 3
140
+ specification_version: 4
176
141
  summary: Easier Rabobank OmniKassa payments
177
142
  test_files: []
data/doc/Gemfile.html DELETED
@@ -1,110 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
- <head>
7
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
-
9
- <title>File: Gemfile [RDoc Documentation]</title>
10
-
11
- <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
-
13
- <script src="./js/jquery.js" type="text/javascript"
14
- charset="utf-8"></script>
15
- <script src="./js/thickbox-compressed.js" type="text/javascript"
16
- charset="utf-8"></script>
17
- <script src="./js/quicksearch.js" type="text/javascript"
18
- charset="utf-8"></script>
19
- <script src="./js/darkfish.js" type="text/javascript"
20
- charset="utf-8"></script>
21
- </head>
22
-
23
- <body class="file">
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="./index.html">Home</a>
29
- <a href="./index.html#classes">Classes</a>
30
- <a href="./index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="project-metadata">
36
-
37
-
38
- <div id="fileindex-section" class="section project-section">
39
- <h3 class="section-header">Files</h3>
40
- <ul>
41
-
42
- <li class="file"><a href="./Gemfile.html">Gemfile</a></li>
43
-
44
- <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
45
-
46
- </ul>
47
- </div>
48
-
49
-
50
- <div id="classindex-section" class="section project-section">
51
- <h3 class="section-header">Class Index
52
- <span class="search-toggle"><img src="./images/find.png"
53
- height="16" width="16" alt="[+]"
54
- title="show/hide quicksearch" /></span></h3>
55
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
56
- <fieldset>
57
- <legend>Quicksearch</legend>
58
- <input type="text" name="quicksearch" value=""
59
- class="quicksearch-field" />
60
- </fieldset>
61
- </form>
62
-
63
- <ul class="link-list">
64
-
65
- <li><a href="./OmniKassa.html">OmniKassa</a></li>
66
-
67
- <li><a href="./OmniKassa/ConfigError.html">OmniKassa::ConfigError</a></li>
68
-
69
- <li><a href="./OmniKassa/OmniKassaError.html">OmniKassa::OmniKassaError</a></li>
70
-
71
- <li><a href="./OmniKassa/Request.html">OmniKassa::Request</a></li>
72
-
73
- <li><a href="./OmniKassa/Request/RequestError.html">OmniKassa::Request::RequestError</a></li>
74
-
75
- <li><a href="./OmniKassa/Response.html">OmniKassa::Response</a></li>
76
-
77
- <li><a href="./OmniKassa/Response/ResponseCodeError.html">OmniKassa::Response::ResponseCodeError</a></li>
78
-
79
- <li><a href="./OmniKassa/Response/SealMismatchError.html">OmniKassa::Response::SealMismatchError</a></li>
80
-
81
- <li><a href="./HelloWorldTest.html">HelloWorldTest</a></li>
82
-
83
- </ul>
84
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
85
- </div>
86
-
87
-
88
- </div>
89
- </div>
90
-
91
- <div id="documentation">
92
- <p>
93
- source :rubygems
94
- </p>
95
- <p>
96
- gem &#8216;poltergeist&#8217;, git: &#8216;<a
97
- href="https://github.com/jonleighton/poltergeist">github.com/jonleighton/poltergeist</a>&#8217;
98
- gemspec
99
- </p>
100
-
101
- </div>
102
-
103
- <div id="validator-badges">
104
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
105
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
106
- Rdoc Generator</a> 1.1.6</small>.</p>
107
- </div>
108
- </body>
109
- </html>
110
-