active_paypal_adaptive_payment 0.3.15 → 0.3.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ## 0.3.16 (2012-11-27)
2
+
3
+ - Also allow details_for_payment to find a transaction by transaction_id. (pull req #39) by https://github.com/Sjors
4
+
1
5
  ## 0.3.15 (2012-07-09)
2
6
 
3
7
  - PayPal requests headers should be case insensitive fix. (pull req #27) by dmitriybudnik
data/README.md CHANGED
@@ -49,10 +49,20 @@ See [iAuction: An Adaptive Payments Tutorial Featuring Parallel Payments](https:
49
49
  :max_amount => "maxTotalAmountOfAllPayments",
50
50
  :maxNumberOfPayments => "maxNumberOfPayments" )
51
51
 
52
+ response = gateway.setup_purchase(
53
+ :return_url => url_for(:action => 'action', :only_path => false),
54
+ :cancel_url => url_for(:action => 'action', :only_path => false),
55
+ :notify_url => url_for(:action => 'notify_action', :only_path => false),
56
+ :receiver_list => recipients
57
+ )
58
+
59
+ # For redirecting the customer to the actual paypal site to finish the payment.
60
+ redirect_to (gateway.redirect_pre_approval_url_for(response["payKey"]))
61
+
52
62
  ### Cancel pre-approved payment
53
63
 
54
64
  gateway.cancel_preapproval(:preapproval_key => "preapprovalkey")
55
-
65
+
56
66
  ### Chained payments
57
67
 
58
68
  def checkout
@@ -70,7 +80,7 @@ See [iAuction: An Adaptive Payments Tutorial Featuring Parallel Payments](https:
70
80
  :receiver_list => recipients
71
81
  )
72
82
 
73
- # for redirecting the customer to the actual paypal site to finish the payment.
83
+ # For redirecting the customer to the actual paypal site to finish the payment.
74
84
  redirect_to (gateway.redirect_url_for(response["payKey"]))
75
85
  end
76
86
 
@@ -160,7 +160,11 @@ module ActiveMerchant
160
160
  x.detailLevel 'ReturnAll'
161
161
  x.errorLanguage opts[:error_language] ||= 'en_US'
162
162
  end
163
- x.payKey opts[:pay_key]
163
+ if opts[:pay_key].present?
164
+ x.payKey opts[:pay_key]
165
+ elsif opts[:transaction_id].present?
166
+ x.payKey opts[:transaction_id]
167
+ end
164
168
  end
165
169
  end
166
170
 
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.15
4
+ version: 0.3.16
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: 2012-07-09 00:00:00.000000000 Z
12
+ date: 2012-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemerchant
16
- requirement: &82351000 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 1.5.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *82351000
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.5.1
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: multi_json
27
- requirement: &82350760 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 1.0.0
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *82350760
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.0.0
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: hashie
38
- requirement: &82366910 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: 1.2.0
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *82366910
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.2.0
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: money
49
- requirement: &82366670 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: 3.6.0
55
70
  type: :runtime
56
71
  prerelease: false
57
- version_requirements: *82366670
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 3.6.0
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: mocha
60
- requirement: &82366430 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,7 +85,12 @@ dependencies:
65
85
  version: 0.10.0
66
86
  type: :runtime
67
87
  prerelease: false
68
- version_requirements: *82366430
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 0.10.0
69
94
  description: ! ' This library is meant to interface with PayPal''s Adaptive Payment
70
95
  Gateway.
71
96
 
@@ -110,9 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
135
  version: 1.3.6
111
136
  requirements: []
112
137
  rubyforge_project:
113
- rubygems_version: 1.8.17
138
+ rubygems_version: 1.8.24
114
139
  signing_key:
115
140
  specification_version: 3
116
141
  summary: ActiveMercant PayPal Adaptive Payment Library
117
142
  test_files: []
118
- has_rdoc: