Skip to content

Commit 6a67de1

Browse files
committed
Upgraded iPizza gem to support new iPizza providers
* Upgraded iPizza gem to v2.0.0 * It adds support for iPizza services (`1011`, `1012`, `4011` and `4012`) * It removes support for iPizza services (`1001`, `1002`, `4001` and `4002`) * Added new provider: LHV Bank * Added LHV and Sampo Bank configuration examples to config init file
1 parent f4cbc4f commit 6a67de1

File tree

6 files changed

+76
-10
lines changed

6 files changed

+76
-10
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source "http://rubygems.org"
1+
source 'https://rubygems.org'
22

33
# Specify your gem's dependencies in ipizza-rails.gemspec
44
gemspec

README.markdown

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
Adds iPizza support to Rails 3 applications. Provides rails generators and easy configuration loading.
1+
Adds iPizza support to Rails 3+ applications. Provides rails generators and easy configuration loading.
2+
3+
Read more about supported providers and configuration options form [ipizza gem hompage](https://github.com/Voog/ipizza).
24

35
Installation
46
------------
57

6-
In your Gemfile add ipizza-rails gem:
8+
In your `Gemfile` add `ipizza-rails` gem:
79

810
gem ipizza-rails
911

ipizza-rails.gemspec

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ Gem::Specification.new do |s|
88
s.platform = Gem::Platform::RUBY
99
s.authors = ['Priit Haamer']
1010
s.email = ['[email protected]']
11-
s.homepage = "http://rubygems.org/gems/ipizza-rails"
11+
s.homepage = "https://github.com/Voog/ipizza-rails"
1212
s.summary = %q{Adds iPizza support to Rails applications}
1313
s.description = %q{Helpers to use iPizza inside Rails applications}
1414

1515
s.files = `git ls-files`.split("\n")
1616
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
1817
s.require_paths = ['lib']
1918

20-
s.add_dependency(%q<ipizza>, ['>= 1.0.0'])
19+
s.add_dependency 'ipizza', '>= 2.0.0'
2120

22-
s.add_development_dependency('rspec', ['>= 2.9.0'])
23-
s.add_development_dependency('rake')
21+
s.add_development_dependency 'rspec', '>= 2.9.0'
22+
s.add_development_dependency 'rake'
2423
end

lib/ipizza-rails/form_helpers.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ module Rails
33
module FormHelpers
44
def ipizza_payment_form_tag(payment, options = {}, &block)
55
request = case options.delete(:service).to_sym
6+
when :lhv
7+
Ipizza::Provider::Lhv.new.payment_request(payment)
68
when :swedbank
79
Ipizza::Provider::Swedbank.new.payment_request(payment)
810
when :seb
911
Ipizza::Provider::Seb.new.payment_request(payment)
1012
when :sampo
1113
Ipizza::Provider::Sampo.new.payment_request(payment)
12-
when :nordea
14+
when :nordea, :danske
1315
Ipizza::Provider::Nordea.new.payment_request(payment)
1416
when :krediidipank
1517
Ipizza::Provider::Krediidipank.new.payment_request(payment)

lib/ipizza-rails/generator/templates/ipizza.yml

+63
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
development:
2+
lhv:
3+
service_url: https://lhv.ee/banklink
4+
return_url: http://localhost:3000/lhv/return
5+
cancel_url: http://localhost:3000/lhv/cancel
6+
login: dealer
7+
file_cert: seb_test_pub.pem
8+
file_key: seb_test_priv.pem
9+
encoding: UTF-8
10+
snd_id: testvpos
11+
12+
sampo:
13+
service_url: https://www2.danskebank.ee/ibank/pizza/pizza
14+
return_url: http://localhost:3000/sampo
15+
cancel_url: http://localhost:3000/sampo
16+
login: dealer
17+
file_cert: seb_test_pub.pem
18+
file_key: seb_test_priv.pem
19+
key_secret: foobar
20+
encoding: UTF-8
21+
snd_id: sender
22+
223
swedbank:
324
service_url: https://www.swedbank.ee/banklink
425
return_url: http://localhost:3000/swedbank/return
@@ -42,6 +63,27 @@ development:
4263
snd_id: testvpos
4364

4465
test:
66+
lhv:
67+
service_url: https://lhv.ee/banklink
68+
return_url: http://test.host:3000/lhv/return
69+
cancel_url: http://test.host:3000/lhv/cancel
70+
login: dealer
71+
file_cert: seb_test_pub.pem
72+
file_key: seb_test_priv.pem
73+
encoding: UTF-8
74+
snd_id: testvpos
75+
76+
sampo:
77+
service_url: https://www2.danskebank.ee/ibank/pizza/pizza
78+
return_url: http://test.host/sampo
79+
cancel_url: http://test.host/sampo
80+
login: dealer
81+
file_cert: seb_test_pub.pem
82+
file_key: seb_test_priv.pem
83+
key_secret: foobar
84+
encoding: UTF-8
85+
snd_id: sender
86+
4587
swedbank:
4688
service_url: https://www.swedbank.ee/banklink
4789
return_url: http://test.host/swedbank/return
@@ -85,6 +127,27 @@ test:
85127
snd_id: testvpos
86128

87129
production:
130+
lhv:
131+
service_url: https://lhv.ee/banklink
132+
return_url: http://myapp.host/lhv/return
133+
cancel_url: http://myapp.host/lhv/cancel
134+
login: dealer
135+
file_cert: seb_test_pub.pem
136+
file_key: seb_test_priv.pem
137+
encoding: UTF-8
138+
snd_id: testvpos
139+
140+
sampo:
141+
service_url: https://www2.danskebank.ee/ibank/pizza/pizza
142+
return_url: http://myapp.host/sampo
143+
cancel_url: http://myapp.host/sampo
144+
login: dealer
145+
file_cert: seb_test_pub.pem
146+
file_key: seb_test_priv.pem
147+
key_secret: foobar
148+
encoding: UTF-8
149+
snd_id: sender
150+
88151
swedbank:
89152
service_url: https://www.swedbank.ee/banklink
90153
return_url: http://myapp.host/swedbank/return

lib/ipizza-rails/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Ipizza
22
module Rails
3-
VERSION = '1.0.0'
3+
VERSION = '2.0.0'
44
end
55
end

0 commit comments

Comments
 (0)