active_paypal_adaptive_payment 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,6 +50,10 @@ module ActiveMerchant #:nodoc:
50
50
  commit('Refund', build_adaptive_refund_details(options))
51
51
  end
52
52
 
53
+ def execute_payment(options)
54
+ commit('ExecutePayment', build_adaptive_execute_payment_request(options))
55
+ end
56
+
53
57
  # Send a preapproval request to pay pal
54
58
  #
55
59
  # ==== Options
@@ -125,6 +129,20 @@ module ActiveMerchant #:nodoc:
125
129
  end
126
130
  end
127
131
 
132
+ def build_adaptive_execute_payment_request(opts)
133
+ @xml = ''
134
+ xml = Builder::XmlMarkup.new :target => @xml, :indent => 2
135
+ xml.instruct!
136
+ xml.ExecutePaymentRequest do |x|
137
+ x.requestEnvelope do |x|
138
+ x.detailLevel 'ReturnAll'
139
+ x.errorLanguage opts[:error_language] ||= 'en_US'
140
+ end
141
+ x.payKey opts[:pay_key] if opts.key?(:pay_key)
142
+ x.fundingPlanId opts[:funding_plan_id] if opts[:funding_plan_id]
143
+ end
144
+ end
145
+
128
146
  def build_adaptive_payment_details_request(opts)
129
147
  @xml = ''
130
148
  xml = Builder::XmlMarkup.new :target => @xml, :indent => 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_paypal_adaptive_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-20 00:00:00.000000000Z
12
+ date: 2011-10-21 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemerchant
16
- requirement: &5938460 !ruby/object:Gem::Requirement
16
+ requirement: &6854140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.5.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *5938460
24
+ version_requirements: *6854140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: multi_json
27
- requirement: &5935140 !ruby/object:Gem::Requirement
27
+ requirement: &6852040 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *5935140
35
+ version_requirements: *6852040
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rash
38
- requirement: &5931400 !ruby/object:Gem::Requirement
38
+ requirement: &6850760 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.3.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *5931400
46
+ version_requirements: *6850760
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: money
49
- requirement: &5928860 !ruby/object:Gem::Requirement
49
+ requirement: &6847440 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 3.6.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *5928860
57
+ version_requirements: *6847440
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mocha
60
- requirement: &5899300 !ruby/object:Gem::Requirement
60
+ requirement: &6843600 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 0.10.0
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *5899300
68
+ version_requirements: *6843600
69
69
  description: ! ' This library is meant to interface with PayPal''s Adaptive Payment
70
70
  Gateway.
71
71