active_merchant_ideal 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +42 -0
- data/LICENSE +1 -1
- data/README.textile +23 -13
- data/Rakefile +2 -33
- data/active_merchant_ideal.gemspec +19 -53
- data/lib/active_merchant_ideal/ideal_response.rb +19 -1
- data/lib/active_merchant_ideal/version.rb +3 -0
- data/test/remote_ideal_test.rb +1 -0
- data/test/test_active_merchant_ideal.rb +9 -0
- metadata +19 -30
- data/VERSION +0 -1
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
active_merchant_ideal (0.1.6)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: http://rubygems.org/
|
8
|
+
specs:
|
9
|
+
active_utils (1.0.1)
|
10
|
+
activesupport (>= 2.3.11)
|
11
|
+
i18n
|
12
|
+
activemerchant (1.20.0)
|
13
|
+
active_utils (>= 1.0.1)
|
14
|
+
activesupport (>= 2.3.11)
|
15
|
+
braintree (>= 2.0.0)
|
16
|
+
builder (>= 2.0.0)
|
17
|
+
i18n
|
18
|
+
json (>= 1.5.1)
|
19
|
+
money (<= 3.7.1)
|
20
|
+
activesupport (3.1.3)
|
21
|
+
multi_json (~> 1.0)
|
22
|
+
braintree (2.13.1)
|
23
|
+
builder (>= 2.0.0)
|
24
|
+
builder (3.0.0)
|
25
|
+
i18n (0.6.0)
|
26
|
+
json (1.6.3)
|
27
|
+
metaclass (0.0.1)
|
28
|
+
mocha (0.10.0)
|
29
|
+
metaclass (~> 0.0.1)
|
30
|
+
money (3.7.1)
|
31
|
+
i18n (~> 0.4)
|
32
|
+
multi_json (1.0.4)
|
33
|
+
rake (0.9.2.2)
|
34
|
+
|
35
|
+
PLATFORMS
|
36
|
+
ruby
|
37
|
+
|
38
|
+
DEPENDENCIES
|
39
|
+
active_merchant_ideal!
|
40
|
+
activemerchant (>= 1.5.1)
|
41
|
+
mocha
|
42
|
+
rake
|
data/LICENSE
CHANGED
data/README.textile
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
h1. Active_merchant_ideal
|
2
2
|
|
3
|
+
h2. ATTENTION: transition period with a new certificate (ING only)
|
4
|
+
|
5
|
+
Recently ING issued a new iDEAL certificate, which should be in production before May 23 2011. See "Wijzigen van een acquiring certificaat in
|
6
|
+
iDEAL Advanced":http://www.ing.nl/Images/Wijzigen_van_een_acquiring_certificaat_in_iDEAL_Advanced_internet_tcm7-82882.pdf. However ING is not able to say exactly when this migration will take place. This means there will be a transition period in which it's uncertain which iDEAL certificate is needed.
|
7
|
+
|
8
|
+
Luckily Roel van Dijk (Voormedia BV) has written a gem/patch, so you can use the old and the new certificate during this transition period.
|
9
|
+
|
10
|
+
See "active_merchant_ideal_multicert":https://github.com/rdvdijk/active_merchant_ideal_multicert
|
11
|
+
|
3
12
|
h2. Description:
|
4
13
|
|
5
14
|
"iDEAL":http://www.ideal.nl payment gateway for "ActiveMerchant":http://www.activemerchant.org.
|
@@ -32,10 +41,10 @@ As a gem:
|
|
32
41
|
sudo gem install active_merchant_ideal
|
33
42
|
</pre>
|
34
43
|
|
35
|
-
Add the following to your
|
44
|
+
Add the following to your Gemfile:
|
36
45
|
|
37
46
|
<pre>
|
38
|
-
|
47
|
+
gem 'active_merchant_ideal'
|
39
48
|
</pre>
|
40
49
|
|
41
50
|
As a plugin:
|
@@ -69,18 +78,19 @@ h3. Test the gem
|
|
69
78
|
You can run the tests from this gem with (inside the active_merchant_ideal directory):
|
70
79
|
|
71
80
|
<pre>
|
72
|
-
|
81
|
+
bundle install
|
82
|
+
bundle exec rake test
|
73
83
|
</pre>
|
74
84
|
|
75
|
-
h3. Run the remote tests (For ING BANK only)
|
85
|
+
h3. Run the remote tests (For ING BANK and Rabobank only)
|
76
86
|
|
77
87
|
* Create .active_merchant directory in your own home directory
|
78
88
|
* Copy test/fixtures.yml to the .active_merchant directory
|
79
89
|
* Fill in your own merchant id, passphrase and the correct locations to your private key and certificates.
|
80
|
-
* For running the *seven prescribed remote test transactions* (ING bank) which are needed to activate the iDEAL account use
|
90
|
+
* For running the *seven prescribed remote test transactions* (ING bank and Rabobank) which are needed to activate the iDEAL account use
|
81
91
|
|
82
92
|
<pre>
|
83
|
-
rake test:remote
|
93
|
+
bundle exec rake test:remote
|
84
94
|
</pre>
|
85
95
|
|
86
96
|
h3. Compatibility
|
@@ -94,14 +104,14 @@ h3. First configure the gateway
|
|
94
104
|
Put the following code in, for instance, an initializer:
|
95
105
|
|
96
106
|
<pre>
|
97
|
-
IdealGateway.acquirer = :ing # Other banks preloaded are :abnamro and :rabobank
|
98
|
-
IdealGateway.merchant_id = '00123456789'
|
99
|
-
IdealGateway.passphrase = 'the_private_key_passphrase'
|
107
|
+
ActiveMerchant::Billing::IdealGateway.acquirer = :ing # Other banks preloaded are :abnamro and :rabobank
|
108
|
+
ActiveMerchant::Billing::IdealGateway.merchant_id = '00123456789'
|
109
|
+
ActiveMerchant::Billing::IdealGateway.passphrase = 'the_private_key_passphrase'
|
100
110
|
|
101
111
|
# CERTIFICATE_ROOT points to a directory where the key and certificates are located
|
102
|
-
IdealGateway.private_key_file = File.join(CERTIFICATE_ROOT, 'private_key.pem')
|
103
|
-
IdealGateway.private_certificate_file = File.join(CERTIFICATE_ROOT, 'private_certificate.cer')
|
104
|
-
IdealGateway.ideal_certificate_file = File.join(CERTIFICATE_ROOT, 'ideal.cer')
|
112
|
+
ActiveMerchant::Billing::IdealGateway.private_key_file = File.join(CERTIFICATE_ROOT, 'private_key.pem')
|
113
|
+
ActiveMerchant::Billing::IdealGateway.private_certificate_file = File.join(CERTIFICATE_ROOT, 'private_certificate.cer')
|
114
|
+
ActiveMerchant::Billing::IdealGateway.ideal_certificate_file = File.join(CERTIFICATE_ROOT, 'ideal.cer')
|
105
115
|
</pre>
|
106
116
|
|
107
117
|
h3. View
|
@@ -185,7 +195,7 @@ In 2007 this code was refactored as a patch for the ActiveMerchant library, this
|
|
185
195
|
|
186
196
|
In 2009 Fingertips forked the ActiveMerchant library and added an iDEAL gateway (presumable based on the first ActiveMerchant patch) to a new ideal branch.
|
187
197
|
|
188
|
-
In 2010 this code was extracted and converted into a separate gem, so it can be more easily used in combination with the latest version of ActiveMerchant. This library is just an extraction, nothing more and nothing less. There are no fundamental changes between the code from the ideal branch and the code of this gem. Later that year "Sernin van de Krol":http://github/
|
198
|
+
In 2010 this code was extracted and converted into a separate gem, so it can be more easily used in combination with the latest version of ActiveMerchant. This library is just an extraction, nothing more and nothing less. There are no fundamental changes between the code from the ideal branch and the code of this gem. Later that year "Sernin van de Krol":http://github.com/paneidos added support for ABN AMRO.
|
189
199
|
|
190
200
|
h2. Maintainer
|
191
201
|
|
data/Rakefile
CHANGED
@@ -1,23 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require 'rake'
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "active_merchant_ideal"
|
8
|
-
gem.summary = %Q{iDEAL gateway for ActiveMerchant}
|
9
|
-
gem.description = %Q{iDEAL payment gateway for ActiveMerchant (see http://www.ideal.nl and http://www.activemerchant.org/)}
|
10
|
-
gem.email = "frank.oxener@gmail.com"
|
11
|
-
gem.homepage = "http://github.com/dovadi/active_merchant_ideal"
|
12
|
-
gem.authors = ["Soemirno Kartosoewito, Matthijs Kadijk, Aloy Duran, Frank Oxener"]
|
13
|
-
gem.add_dependency('activemerchant', '>= 1.5.1')
|
14
|
-
gem.add_development_dependency "mocha", ">= 0.9.7"
|
15
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
-
end
|
17
|
-
Jeweler::GemcutterTasks.new
|
18
|
-
rescue LoadError
|
19
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
|
-
end
|
1
|
+
require "bundler/gem_tasks"
|
21
2
|
|
22
3
|
require 'rake/testtask'
|
23
4
|
Rake::TestTask.new(:test) do |test|
|
@@ -30,21 +11,9 @@ namespace :test do
|
|
30
11
|
desc "Run the remote tests for iDEAL gateway"
|
31
12
|
Rake::TestTask.new(:remote) do |t|
|
32
13
|
t.libs << "test"
|
33
|
-
t.test_files = FileList['remote_ideal_test.rb']
|
14
|
+
t.test_files = FileList['test/remote_ideal_test.rb']
|
34
15
|
t.verbose = true
|
35
16
|
end
|
36
17
|
end
|
37
18
|
|
38
|
-
task :test => :check_dependencies
|
39
|
-
|
40
19
|
task :default => :test
|
41
|
-
|
42
|
-
require 'rake/rdoctask'
|
43
|
-
Rake::RDocTask.new do |rdoc|
|
44
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
45
|
-
|
46
|
-
rdoc.rdoc_dir = 'rdoc'
|
47
|
-
rdoc.title = "active_merchant_ideal #{version}"
|
48
|
-
rdoc.rdoc_files.include('README*')
|
49
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
|
-
end
|
@@ -1,62 +1,28 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "active_merchant_ideal/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
6
|
s.name = %q{active_merchant_ideal}
|
8
|
-
s.version
|
7
|
+
s.version = ActiveMerchantIdeal::VERSION
|
8
|
+
s.authors = ["Soemirno Kartosoewito, Matthijs Kadijk, Aloy Duran, Frank Oxener and many others"]
|
9
|
+
s.description = %q{iDEAL payment gateway for ActiveMerchant (see http://www.ideal.nl and http://www.activemerchant.org/)}
|
10
|
+
s.summary = %q{iDEAL gateway for ActiveMerchant}
|
11
|
+
s.email = %q{frank.oxener@gmail.com}
|
12
|
+
|
13
|
+
s.homepage = %q{http://github.com/dovadi/active_merchant_ideal}
|
9
14
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Soemirno Kartosoewito, Matthijs Kadijk, Aloy Duran, Frank Oxener"]
|
12
|
-
s.date = %q{2010-12-08}
|
13
|
-
s.description = %q{iDEAL payment gateway for ActiveMerchant (see http://www.ideal.nl and http://www.activemerchant.org/)}
|
14
|
-
s.email = %q{frank.oxener@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"LICENSE",
|
22
|
-
"README.textile",
|
23
|
-
"Rakefile",
|
24
|
-
"VERSION",
|
25
|
-
"active_merchant_ideal.gemspec",
|
26
|
-
"init.rb",
|
27
|
-
"lib/active_merchant_ideal.rb",
|
28
|
-
"lib/active_merchant_ideal/acquirers.yml",
|
29
|
-
"lib/active_merchant_ideal/ideal.rb",
|
30
|
-
"lib/active_merchant_ideal/ideal_response.rb",
|
31
|
-
"test/fixtures.yml",
|
32
|
-
"test/helper.rb",
|
33
|
-
"test/remote_ideal_test.rb",
|
34
|
-
"test/test_active_merchant_ideal.rb"
|
35
|
-
]
|
36
|
-
s.homepage = %q{http://github.com/dovadi/active_merchant_ideal}
|
37
|
-
s.require_paths = ["lib"]
|
38
|
-
s.rubygems_version = %q{1.3.7}
|
39
|
-
s.summary = %q{iDEAL gateway for ActiveMerchant}
|
40
|
-
s.test_files = [
|
41
|
-
"test/helper.rb",
|
42
|
-
"test/remote_ideal_test.rb",
|
43
|
-
"test/test_active_merchant_ideal.rb"
|
44
|
-
]
|
16
|
+
"LICENSE",
|
17
|
+
"README.textile"
|
18
|
+
]
|
45
19
|
|
46
|
-
|
47
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
48
|
-
s.specification_version = 3
|
20
|
+
s.rubyforge_project = "active_merchant_ideal"
|
49
21
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
s.add_dependency(%q<activemerchant>, [">= 1.5.1"])
|
55
|
-
s.add_dependency(%q<mocha>, [">= 0.9.7"])
|
56
|
-
end
|
57
|
-
else
|
58
|
-
s.add_dependency(%q<activemerchant>, [">= 1.5.1"])
|
59
|
-
s.add_dependency(%q<mocha>, [">= 0.9.7"])
|
60
|
-
end
|
61
|
-
end
|
22
|
+
s.files = `git ls-files`.split("\n")
|
23
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
24
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
25
|
+
s.require_paths = ["lib"]
|
62
26
|
|
27
|
+
s.add_development_dependency "mocha"
|
28
|
+
end
|
@@ -178,7 +178,8 @@ module ActiveMerchant #:nodoc:
|
|
178
178
|
# <tt>:cancelled</tt>, <tt>:expired</tt>, <tt>:open</tt>, or
|
179
179
|
# <tt>:failure</tt>.
|
180
180
|
def status
|
181
|
-
text('//status')
|
181
|
+
status = text('//status')
|
182
|
+
status.downcase.to_sym unless status.blank?
|
182
183
|
end
|
183
184
|
|
184
185
|
# Returns whether or not the authenticity of the message could be
|
@@ -188,6 +189,23 @@ module ActiveMerchant #:nodoc:
|
|
188
189
|
verify(OpenSSL::Digest::SHA1.new, signature, message)
|
189
190
|
end
|
190
191
|
|
192
|
+
# Returns the bankaccount number when the transaction was successful.
|
193
|
+
def consumer_account_number
|
194
|
+
text('//consumerAccountNumber')
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the name on the bankaccount of the customer when the
|
198
|
+
# transaction was successful.
|
199
|
+
def consumer_name
|
200
|
+
text('//consumerName')
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the city on the bankaccount of the customer when the
|
204
|
+
# transaction was successful.
|
205
|
+
def consumer_city
|
206
|
+
text('//consumerCity')
|
207
|
+
end
|
208
|
+
|
191
209
|
private
|
192
210
|
|
193
211
|
# Checks if no errors occured _and_ if the message was authentic.
|
data/test/remote_ideal_test.rb
CHANGED
@@ -514,6 +514,15 @@ module IdealTestCases
|
|
514
514
|
|
515
515
|
assert !capture_response.success?
|
516
516
|
end
|
517
|
+
|
518
|
+
def test_capture_of_consumer_fields
|
519
|
+
expects_request_and_returns ACQUIRER_SUCCEEDED_STATUS_RESPONSE
|
520
|
+
capture_response = @gateway.capture('0001023456789112')
|
521
|
+
|
522
|
+
assert_equal '0949298989', capture_response.consumer_account_number
|
523
|
+
assert_equal 'Onderheuvel', capture_response.consumer_name
|
524
|
+
assert_equal 'DEN HAAG', capture_response.consumer_city
|
525
|
+
end
|
517
526
|
|
518
527
|
def test_returns_status
|
519
528
|
response = IdealStatusResponse.new(ACQUIRER_SUCCEEDED_STATUS_RESPONSE)
|
metadata
CHANGED
@@ -1,52 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_merchant_ideal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 7
|
10
|
+
version: 0.1.7
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
|
-
- Soemirno Kartosoewito, Matthijs Kadijk, Aloy Duran, Frank Oxener
|
13
|
+
- Soemirno Kartosoewito, Matthijs Kadijk, Aloy Duran, Frank Oxener and many others
|
13
14
|
autorequire:
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
-
default_executable:
|
18
|
+
date: 2011-12-14 00:00:00 Z
|
19
19
|
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
21
|
-
name: activemerchant
|
22
|
-
prerelease: false
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
|
-
requirements:
|
26
|
-
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 1
|
30
|
-
- 5
|
31
|
-
- 1
|
32
|
-
version: 1.5.1
|
33
|
-
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
20
|
- !ruby/object:Gem::Dependency
|
36
21
|
name: mocha
|
37
22
|
prerelease: false
|
38
|
-
requirement: &
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
39
24
|
none: false
|
40
25
|
requirements:
|
41
26
|
- - ">="
|
42
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
43
29
|
segments:
|
44
30
|
- 0
|
45
|
-
|
46
|
-
- 7
|
47
|
-
version: 0.9.7
|
31
|
+
version: "0"
|
48
32
|
type: :development
|
49
|
-
version_requirements: *
|
33
|
+
version_requirements: *id001
|
50
34
|
description: iDEAL payment gateway for ActiveMerchant (see http://www.ideal.nl and http://www.activemerchant.org/)
|
51
35
|
email: frank.oxener@gmail.com
|
52
36
|
executables: []
|
@@ -58,21 +42,23 @@ extra_rdoc_files:
|
|
58
42
|
- README.textile
|
59
43
|
files:
|
60
44
|
- .document
|
45
|
+
- .gitignore
|
46
|
+
- Gemfile
|
47
|
+
- Gemfile.lock
|
61
48
|
- LICENSE
|
62
49
|
- README.textile
|
63
50
|
- Rakefile
|
64
|
-
- VERSION
|
65
51
|
- active_merchant_ideal.gemspec
|
66
52
|
- init.rb
|
67
53
|
- lib/active_merchant_ideal.rb
|
68
54
|
- lib/active_merchant_ideal/acquirers.yml
|
69
55
|
- lib/active_merchant_ideal/ideal.rb
|
70
56
|
- lib/active_merchant_ideal/ideal_response.rb
|
57
|
+
- lib/active_merchant_ideal/version.rb
|
71
58
|
- test/fixtures.yml
|
72
59
|
- test/helper.rb
|
73
60
|
- test/remote_ideal_test.rb
|
74
61
|
- test/test_active_merchant_ideal.rb
|
75
|
-
has_rdoc: true
|
76
62
|
homepage: http://github.com/dovadi/active_merchant_ideal
|
77
63
|
licenses: []
|
78
64
|
|
@@ -86,6 +72,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
72
|
requirements:
|
87
73
|
- - ">="
|
88
74
|
- !ruby/object:Gem::Version
|
75
|
+
hash: 3
|
89
76
|
segments:
|
90
77
|
- 0
|
91
78
|
version: "0"
|
@@ -94,17 +81,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
81
|
requirements:
|
95
82
|
- - ">="
|
96
83
|
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
97
85
|
segments:
|
98
86
|
- 0
|
99
87
|
version: "0"
|
100
88
|
requirements: []
|
101
89
|
|
102
|
-
rubyforge_project:
|
103
|
-
rubygems_version: 1.
|
90
|
+
rubyforge_project: active_merchant_ideal
|
91
|
+
rubygems_version: 1.8.6
|
104
92
|
signing_key:
|
105
93
|
specification_version: 3
|
106
94
|
summary: iDEAL gateway for ActiveMerchant
|
107
95
|
test_files:
|
96
|
+
- test/fixtures.yml
|
108
97
|
- test/helper.rb
|
109
98
|
- test/remote_ideal_test.rb
|
110
99
|
- test/test_active_merchant_ideal.rb
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.6
|