adyen 0.3.6 → 0.3.7

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.
Files changed (4) hide show
  1. data/adyen.gemspec +2 -2
  2. data/lib/adyen.rb +5 -0
  3. data/lib/adyen/soap.rb +19 -3
  4. metadata +3 -3
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'adyen'
3
- s.version = "0.3.6"
4
- s.date = "2010-03-27"
3
+ s.version = "0.3.7"
4
+ s.date = "2010-07-21"
5
5
 
6
6
  s.summary = "Integrate Adyen payment services in you Ruby on Rails application."
7
7
  s.description = <<-EOS
@@ -10,6 +10,11 @@
10
10
  # maintenance and issuing recurring payments.
11
11
  module Adyen
12
12
 
13
+ # Version constant for the Adyen plugin.
14
+ # DO NOT CHANGE THIS VALUE BY HAND. It will be updated automatically by
15
+ # the gem:release rake task.
16
+ VERSION = "0.3.7"
17
+
13
18
  # Loads configuration settings from a Hash.
14
19
  #
15
20
  # @param [Hash] hash The (nested Hash) with configuration variables.
@@ -144,6 +144,11 @@ module Adyen
144
144
  # changed in the mean time.
145
145
  # @option args [String] :shopper_reference The reference of the shopper. This should be
146
146
  # the same as the reference that was used to create the recurring contract.
147
+ # @option args [Integer] :fraud_offset (optional) An integer that is added to normal fraud score.
148
+ # The value can be either positive or negative.
149
+ # @option args [String] :shopper_ip (optional) The IP address of the shopper. Used in various risk
150
+ # checks (number of payment attempts, location based checks), so it is a good idea to supply
151
+ # this.
147
152
  #
148
153
  # @return [nil] This action returns nothing of interest. The result of the authorization
149
154
  # will be communicated using a {Adyen::Notification notification}.
@@ -171,6 +176,10 @@ module Adyen
171
176
  req.add('payment:shopperEmail', invoke_args[:shopper_email])
172
177
  req.add('payment:shopperReference', invoke_args[:shopper_reference])
173
178
  req.add('payment:shopperInteraction', 'ContAuth')
179
+
180
+ # optional fields
181
+ req.add('payment:fraudOffset', invoke_args[:fraud_offset]) if(invoke_args[:fraud_offset])
182
+ req.add('payment:shopperIP', invoke_args[:shopper_ip]) if(invoke_args[:shopper_ip])
174
183
  end
175
184
  end
176
185
 
@@ -203,6 +212,9 @@ module Adyen
203
212
  # changed in the mean time.
204
213
  # @option args [String] :shopper_reference The reference of the shopper. This should be
205
214
  # the same as the reference that was used to create the recurring contract.
215
+ # @option args [String] :shopper_ip (optional) The IP address of the shopper. Used in various risk
216
+ # checks (number of payment attempts, location based checks), so it is a good idea to supply
217
+ # this.
206
218
  #
207
219
  # @return [nil] This action returns nothing of interest. The result of the authorization
208
220
  # will be communicated using a {Adyen::Notification notification}.
@@ -216,7 +228,7 @@ module Adyen
216
228
  invoke_args[:selected_recurring_detail_reference] ||= 'LATEST'
217
229
 
218
230
  response = invoke('payment:directdebit') do |message|
219
- message.add('payment:paymentRequest') do |req|
231
+ message.add('payment:request') do |req|
220
232
  req.add('payment:selectedRecurringDetailReference', invoke_args[:selected_recurring_detail_reference])
221
233
  req.add('payment:recurring') do |recurring|
222
234
  recurring.add('payment:contract', 'RECURRING')
@@ -230,6 +242,7 @@ module Adyen
230
242
  req.add('payment:shopperEmail', invoke_args[:shopper_email])
231
243
  req.add('payment:shopperReference', invoke_args[:shopper_reference])
232
244
  req.add('payment:shopperInteraction', 'ContAuth')
245
+ req.add('payment:shopperIP', invoke_args[:shopper_ip]) if(invoke_args[:shopper_ip])
233
246
  end
234
247
  end
235
248
 
@@ -497,7 +510,10 @@ module Adyen
497
510
  def list(args = {})
498
511
  invoke_args = Adyen::SOAP.default_arguments.merge(args)
499
512
  response = invoke('recurring:listRecurringDetails') do |message|
500
- message.add('recurring:recurringRequest') do |req|
513
+ message.add('recurring:request') do |req|
514
+ req.add('recurring:recurring') do |recurring|
515
+ recurring.add('recurring:contract', 'RECURRING')
516
+ end
501
517
  req.add('recurring:merchantAccount', invoke_args[:merchant_account])
502
518
  req.add('recurring:shopperReference', invoke_args[:shopper_reference])
503
519
  end
@@ -526,7 +542,7 @@ module Adyen
526
542
  def disable(args = {})
527
543
  invoke_args = Adyen::SOAP.default_arguments.merge(args)
528
544
  response = invoke('recurring:disable') do |message|
529
- message.add('recurring:disableRequest') do |req|
545
+ message.add('recurring:request') do |req|
530
546
  req.add('recurring:merchantAccount', invoke_args[:merchant_account])
531
547
  req.add('recurring:shopperReference', invoke_args[:shopper_reference])
532
548
  req.add('recurring:recurringDetailReference', invoke_args[:recurring_detail_reference])
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 6
9
- version: 0.3.6
8
+ - 7
9
+ version: 0.3.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Willem van Bergen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-03-27 00:00:00 +01:00
18
+ date: 2010-07-21 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency