adyen 1.3.0 → 1.3.1
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/.travis.yml +2 -1
- data/adyen.gemspec +2 -2
- data/lib/adyen.rb +1 -1
- data/lib/adyen/api.rb +10 -6
- data/lib/adyen/api/payment_service.rb +2 -1
- data/lib/adyen/api/templates/payment_service.rb +1 -0
- data/lib/adyen/templates/notification_migration.rb +2 -2
- data/spec/api/payment_service_spec.rb +5 -0
- data/spec/api/recurring_service_spec.rb +1 -0
- data/spec/api/test_helpers_spec.rb +1 -0
- metadata +7 -18
data/.travis.yml
CHANGED
data/adyen.gemspec
CHANGED
data/lib/adyen.rb
CHANGED
@@ -12,7 +12,7 @@ module Adyen
|
|
12
12
|
# Version constant for the Adyen plugin.
|
13
13
|
# DO NOT CHANGE THIS VALUE BY HAND. It will be updated automatically by
|
14
14
|
# the gem:release rake task.
|
15
|
-
VERSION = "1.3.
|
15
|
+
VERSION = "1.3.1"
|
16
16
|
|
17
17
|
# @return [Configuration] The configuration singleton.
|
18
18
|
def self.configuration
|
data/lib/adyen/api.rb
CHANGED
@@ -56,7 +56,7 @@ module Adyen
|
|
56
56
|
# response = Adyen::API.authorise_payment(
|
57
57
|
# invoice.id,
|
58
58
|
# { :currency => 'EUR', :value => invoice.amount },
|
59
|
-
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8' },
|
59
|
+
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8', :statement => 'invoice number 123456'},
|
60
60
|
# { :holder_name => "Simon Hopper", :number => '4444333322221111', :cvc => '737',
|
61
61
|
# :expiry_month => 12, :expiry_year => 2012 }
|
62
62
|
# )
|
@@ -74,6 +74,7 @@ module Adyen
|
|
74
74
|
# @option shopper [Numeric,String] :reference The shopper’s reference (ID).
|
75
75
|
# @option shopper [String] :email The shopper’s email address.
|
76
76
|
# @option shopper [String] :ip The shopper’s IP address.
|
77
|
+
# @option shopper [String] :statement The shopper's statement
|
77
78
|
#
|
78
79
|
# @option card [String] :holder_name The full name on the card.
|
79
80
|
# @option card [String] :number The card number.
|
@@ -108,7 +109,7 @@ module Adyen
|
|
108
109
|
# response = Adyen::API.authorise_recurring_payment(
|
109
110
|
# invoice.id,
|
110
111
|
# { :currency => 'EUR', :value => invoice.amount },
|
111
|
-
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8' }
|
112
|
+
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8', :statement => 'invoice number 123456' }
|
112
113
|
# )
|
113
114
|
# response.authorised? # => true
|
114
115
|
#
|
@@ -123,6 +124,7 @@ module Adyen
|
|
123
124
|
# @option shopper [Numeric,String] :reference The shopper’s reference (ID).
|
124
125
|
# @option shopper [String] :email The shopper’s email address.
|
125
126
|
# @option shopper [String] :ip The shopper’s IP address.
|
127
|
+
# @option shopper [String] :statement The shopper's statement
|
126
128
|
#
|
127
129
|
# @param [String] recurring_detail_reference The recurring contract reference to use.
|
128
130
|
# @see list_recurring_details
|
@@ -150,7 +152,7 @@ module Adyen
|
|
150
152
|
# payment = Adyen::API.authorise_one_click_payment(
|
151
153
|
# invoice.id,
|
152
154
|
# { :currency => 'EUR', :value => invoice.amount },
|
153
|
-
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8' },
|
155
|
+
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8', :statement => 'invoice number 123456' },
|
154
156
|
# '737',
|
155
157
|
# detail
|
156
158
|
# )
|
@@ -168,6 +170,7 @@ module Adyen
|
|
168
170
|
# @option shopper [Numeric,String] :reference The shopper’s reference (ID).
|
169
171
|
# @option shopper [String] :email The shopper’s email address.
|
170
172
|
# @option shopper [String] :ip The shopper’s IP address.
|
173
|
+
# @option shopper [String] :statement The shopper's statement
|
171
174
|
#
|
172
175
|
# @param [String] recurring_detail_reference The recurring contract reference to use.
|
173
176
|
# @see list_recurring_details
|
@@ -286,7 +289,7 @@ module Adyen
|
|
286
289
|
#
|
287
290
|
# # @example
|
288
291
|
# response = Adyen::API.store_recurring_token(
|
289
|
-
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8' },
|
292
|
+
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8', :statement => 'invoice number 123456' },
|
290
293
|
# { :holder_name => "Simon Hopper", :number => '4444333322221111',
|
291
294
|
# :expiry_month => 12, :expiry_year => 2012 }
|
292
295
|
# )
|
@@ -295,7 +298,7 @@ module Adyen
|
|
295
298
|
#
|
296
299
|
# # @example
|
297
300
|
# response = Adyen::API.store_recurring_token(
|
298
|
-
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8' },
|
301
|
+
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8', :statement => 'invoice number 123456' },
|
299
302
|
# { :bank_location => "Berlin", :bank_name => "TestBank", :bank_location_id => "12345678",
|
300
303
|
# :holder_name => "Simon Hopper", :number => "1234567890" }
|
301
304
|
# )
|
@@ -305,7 +308,7 @@ module Adyen
|
|
305
308
|
# authorize_response = Adyen::API.authorise_recurring_payment(
|
306
309
|
# invoice.id,
|
307
310
|
# { :currency => 'EUR', :value => invoice.amount },
|
308
|
-
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8' },
|
311
|
+
# { :reference => user.id, :email => user.email, :ip => '8.8.8.8', :statement => 'invoice number 123456' },
|
309
312
|
# response.recurring_detail_reference
|
310
313
|
# )
|
311
314
|
# authorize_response.authorised? # => true
|
@@ -316,6 +319,7 @@ module Adyen
|
|
316
319
|
# @option shopper [Numeric,String] :reference The shopper’s reference (ID).
|
317
320
|
# @option shopper [String] :email The shopper’s email address.
|
318
321
|
# @option shopper [String] :ip The shopper’s IP address.
|
322
|
+
# @option shopper [String] :statement The shopper's statement
|
319
323
|
#
|
320
324
|
# @option params [String] :holder_name The full name on the card or of the
|
321
325
|
# account holder.
|
@@ -97,6 +97,7 @@ EOS
|
|
97
97
|
:reference => ' <payment:shopperReference>%s</payment:shopperReference>',
|
98
98
|
:email => ' <payment:shopperEmail>%s</payment:shopperEmail>',
|
99
99
|
:ip => ' <payment:shopperIP>%s</payment:shopperIP>',
|
100
|
+
:statement => ' <payment:shopperStatement>%s</payment:shopperStatement>',
|
100
101
|
}
|
101
102
|
end
|
102
103
|
end
|
@@ -4,8 +4,8 @@ class CreateAdyenNotifications < ActiveRecord::Migration
|
|
4
4
|
def self.up
|
5
5
|
create_table :adyen_notifications do |t|
|
6
6
|
t.boolean :live, :null => false, :default => false
|
7
|
-
t.string :event_code, :null => false
|
8
|
-
t.string :psp_reference, :null => false
|
7
|
+
t.string :event_code, :null => false, :limit => 20
|
8
|
+
t.string :psp_reference, :null => false, :limit => 30
|
9
9
|
t.string :original_reference, :null => true
|
10
10
|
t.string :merchant_reference, :null => false
|
11
11
|
t.string :merchant_account_code, :null => false
|
@@ -21,6 +21,7 @@ shared_examples_for "payment requests" do
|
|
21
21
|
text('./payment:shopperReference').should == 'user-id'
|
22
22
|
text('./payment:shopperEmail').should == 's.hopper@example.com'
|
23
23
|
text('./payment:shopperIP').should == '61.294.12.12'
|
24
|
+
text('./payment:shopperStatement').should == 'invoice number 123456'
|
24
25
|
end
|
25
26
|
|
26
27
|
it "only includes shopper details for given parameters" do
|
@@ -32,6 +33,8 @@ shared_examples_for "payment requests" do
|
|
32
33
|
xpath('./payment:shopperEmail').should be_empty
|
33
34
|
@payment.params[:shopper].delete(:ip)
|
34
35
|
xpath('./payment:shopperIP').should be_empty
|
36
|
+
@payment.params[:shopper].delete(:statement)
|
37
|
+
xpath('./payment:shopperStatement').should be_empty
|
35
38
|
end
|
36
39
|
end
|
37
40
|
|
@@ -42,6 +45,7 @@ shared_examples_for "payment requests" do
|
|
42
45
|
xpath('./payment:shopperReference').should be_empty
|
43
46
|
xpath('./payment:shopperEmail').should be_empty
|
44
47
|
xpath('./payment:shopperIP').should be_empty
|
48
|
+
xpath('./payment:statement').should be_empty
|
45
49
|
end
|
46
50
|
end
|
47
51
|
end
|
@@ -69,6 +73,7 @@ describe Adyen::API::PaymentService do
|
|
69
73
|
:email => 's.hopper@example.com',
|
70
74
|
:reference => 'user-id',
|
71
75
|
:ip => '61.294.12.12',
|
76
|
+
:statement => 'invoice number 123456',
|
72
77
|
},
|
73
78
|
:card => {
|
74
79
|
:expiry_month => 12,
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adyen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
8
|
+
- 1
|
9
|
+
version: 1.3.1
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Willem van Bergen
|
@@ -18,17 +17,16 @@ autorequire:
|
|
18
17
|
bindir: bin
|
19
18
|
cert_chain: []
|
20
19
|
|
21
|
-
date:
|
20
|
+
date: 2012-02-20 00:00:00 -05:00
|
21
|
+
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: rake
|
25
25
|
prerelease: false
|
26
26
|
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
27
|
requirements:
|
29
28
|
- - ">="
|
30
29
|
- !ruby/object:Gem::Version
|
31
|
-
hash: 3
|
32
30
|
segments:
|
33
31
|
- 0
|
34
32
|
version: "0"
|
@@ -38,11 +36,9 @@ dependencies:
|
|
38
36
|
name: rspec
|
39
37
|
prerelease: false
|
40
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
39
|
requirements:
|
43
40
|
- - ~>
|
44
41
|
- !ruby/object:Gem::Version
|
45
|
-
hash: 7
|
46
42
|
segments:
|
47
43
|
- 2
|
48
44
|
version: "2"
|
@@ -52,11 +48,9 @@ dependencies:
|
|
52
48
|
name: rails
|
53
49
|
prerelease: false
|
54
50
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
51
|
requirements:
|
57
52
|
- - ">="
|
58
53
|
- !ruby/object:Gem::Version
|
59
|
-
hash: 5
|
60
54
|
segments:
|
61
55
|
- 2
|
62
56
|
- 3
|
@@ -67,11 +61,9 @@ dependencies:
|
|
67
61
|
name: nokogiri
|
68
62
|
prerelease: false
|
69
63
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
64
|
requirements:
|
72
65
|
- - ">="
|
73
66
|
- !ruby/object:Gem::Version
|
74
|
-
hash: 3
|
75
67
|
segments:
|
76
68
|
- 0
|
77
69
|
version: "0"
|
@@ -133,6 +125,7 @@ files:
|
|
133
125
|
- spec/spec_helper.rb
|
134
126
|
- tasks/github-gem.rake
|
135
127
|
- yard_extensions.rb
|
128
|
+
has_rdoc: true
|
136
129
|
homepage: http://github.com/wvanbergen/adyen/wiki
|
137
130
|
licenses: []
|
138
131
|
|
@@ -147,27 +140,23 @@ rdoc_options:
|
|
147
140
|
require_paths:
|
148
141
|
- lib
|
149
142
|
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
-
none: false
|
151
143
|
requirements:
|
152
144
|
- - ">="
|
153
145
|
- !ruby/object:Gem::Version
|
154
|
-
hash: 3
|
155
146
|
segments:
|
156
147
|
- 0
|
157
148
|
version: "0"
|
158
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
|
-
none: false
|
160
150
|
requirements:
|
161
151
|
- - ">="
|
162
152
|
- !ruby/object:Gem::Version
|
163
|
-
hash: 3
|
164
153
|
segments:
|
165
154
|
- 0
|
166
155
|
version: "0"
|
167
156
|
requirements:
|
168
157
|
- Having Nokogiri installed will speed up XML handling when using the SOAP API.
|
169
158
|
rubyforge_project:
|
170
|
-
rubygems_version: 1.
|
159
|
+
rubygems_version: 1.3.6
|
171
160
|
signing_key:
|
172
161
|
specification_version: 3
|
173
162
|
summary: Integrate Adyen payment services in your Ruby on Rails application.
|