active_paypal_adaptive_payment 0.2.4 → 0.2.5
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/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -30,27 +30,26 @@ See [iAuction: An Adaptive Payments Tutorial Featuring Parallel Payments](https:
|
|
30
30
|
|
31
31
|
gateway =
|
32
32
|
ActiveMerchant::Billing::PaypalAdaptivePayment.new(
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
)
|
33
|
+
:login => "acutio_1313133342_biz_api1.gmail.com",
|
34
|
+
:password => "1255043567",
|
35
|
+
:signature => "Abg0gYcQlsdkls2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf",
|
36
|
+
:appid => "APP-80W284485P519543T" )
|
38
37
|
|
39
38
|
### Pre-approved paymen
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
40
|
+
gateway.preapprove_payment (
|
41
|
+
:return_url => "returnURL",
|
42
|
+
:cancel_url => "cancelURL",
|
43
|
+
:senderEmail =>"email address of sender",
|
44
|
+
:start_date => Time.now,
|
45
|
+
:end_date => Time.now + (60*60*24) * 30,
|
46
|
+
:currency_code =>"currency code",
|
47
|
+
:max_amount => "maxTotalAmountOfAllPayments",
|
48
|
+
:maxNumberOfPayments => "maxNumberOfPayments" )
|
50
49
|
|
51
50
|
### Cancel pre-approved payment
|
52
51
|
|
53
|
-
|
52
|
+
gateway.cancel_preapproval(:preapproval_key => "preapprovalkey")
|
54
53
|
|
55
54
|
### Chained payments
|
56
55
|
|
@@ -62,13 +61,15 @@ See [iAuction: An Adaptive Payments Tutorial Featuring Parallel Payments](https:
|
|
62
61
|
:amount => recipient_amount,
|
63
62
|
:primary => false}
|
64
63
|
]
|
65
|
-
response = gateway.
|
64
|
+
response = gateway.setup_purchase(
|
66
65
|
:return_url => url_for(:action => 'action', :only_path => false),
|
67
66
|
:cancel_url => url_for(:action => 'action', :only_path => false),
|
68
67
|
:notify_url => url_for(:action => 'notify_action', :only_path => false),
|
69
68
|
:receiver_list => recipients
|
70
69
|
)
|
71
|
-
|
70
|
+
|
71
|
+
# for redirecting the customer to the actual paypal site to finish the payment.
|
72
|
+
redirect_to (gateway.redirect_url_for(response["payKey"]))
|
72
73
|
end
|
73
74
|
|
74
75
|
Set the `:primary` flag to `false` for each recipient for a split payment.
|
@@ -105,6 +105,7 @@ module ActiveMerchant #:nodoc:
|
|
105
105
|
x.returnUrl opts[:return_url]
|
106
106
|
x.ipnNotificationUrl opts[:ipn_notification_url] if opts[:ipn_notification_url]
|
107
107
|
x.memo opts[:memo] if opts.key?(:memo)
|
108
|
+
x.custom opts[:custom] if opts.key?(:custom)
|
108
109
|
x.feesPayer opts[:fees_payer] if opts[:fees_payer]
|
109
110
|
x.pin opts[:pin] if opts[:pin]
|
110
111
|
x.currencyCode opts[:currency_code] ||= 'USD'
|
@@ -1,12 +1,10 @@
|
|
1
1
|
# fix for case sensitive headers in paypal (issue #1)
|
2
|
-
module Net
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
return val
|
8
|
-
end
|
9
|
-
@header[key] = [val]
|
2
|
+
module Net; module HTTPHeader
|
3
|
+
def []= key, val
|
4
|
+
unless val
|
5
|
+
@header.delete key
|
6
|
+
return val
|
10
7
|
end
|
8
|
+
@header[key] = [val]
|
11
9
|
end
|
12
|
-
end
|
10
|
+
end; end
|
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.2.
|
4
|
+
version: 0.2.5
|
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-
|
12
|
+
date: 2011-10-03 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemerchant
|
16
|
-
requirement: &
|
16
|
+
requirement: &8151980 !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: *
|
24
|
+
version_requirements: *8151980
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: multi_json
|
27
|
-
requirement: &
|
27
|
+
requirement: &8151440 !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: *
|
35
|
+
version_requirements: *8151440
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rash
|
38
|
-
requirement: &
|
38
|
+
requirement: &8150900 !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: *
|
46
|
+
version_requirements: *8150900
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: money
|
49
|
-
requirement: &
|
49
|
+
requirement: &8150260 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 3.6.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *8150260
|
58
58
|
description: ! ' This library is meant to interface with PayPal''s Adaptive Payment
|
59
59
|
Gateway.
|
60
60
|
|
@@ -66,11 +66,11 @@ extensions: []
|
|
66
66
|
extra_rdoc_files: []
|
67
67
|
files:
|
68
68
|
- lib/active_paypal_adaptive_payment.rb
|
69
|
-
- lib/active_merchant/billing/gateways/
|
69
|
+
- lib/active_merchant/billing/gateways/paypal_adaptive_payment.rb
|
70
|
+
- lib/active_merchant/billing/gateways/paypal_adaptive_payments/ext.rb
|
70
71
|
- lib/active_merchant/billing/gateways/paypal_adaptive_payments/exceptions.rb
|
71
72
|
- lib/active_merchant/billing/gateways/paypal_adaptive_payments/adaptive_payment_response.rb
|
72
|
-
- lib/active_merchant/billing/gateways/
|
73
|
-
- lib/active_merchant/billing/gateways/paypal_adaptive_payment.rb
|
73
|
+
- lib/active_merchant/billing/gateways/paypal_adaptive_payment_common.rb
|
74
74
|
- MIT-LICENSE
|
75
75
|
- README.md
|
76
76
|
- CHANGELOG.md
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: 1.3.6
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 1.8.
|
97
|
+
rubygems_version: 1.8.10
|
98
98
|
signing_key:
|
99
99
|
specification_version: 3
|
100
100
|
summary: ActiveMercant PayPal Adaptive Payment Library
|