astrails-paypal_adaptive 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/astrails-paypal_adaptive.gemspec +1 -1
- data/lib/config.rb +1 -0
- data/lib/response.rb +9 -3
- metadata +36 -62
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{astrails-paypal_adaptive}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tommy Chheng", "Ross Hale", "Boris Nadion"]
|
data/lib/config.rb
CHANGED
@@ -48,6 +48,7 @@ module PaypalAdaptive
|
|
48
48
|
}
|
49
49
|
|
50
50
|
@headers["X-PAYPAL-SANDBOX-EMAIL-ADDRESS"] = config['sandbox_email'] if pp_env == :sandbox
|
51
|
+
@headers["X-PAYPAL-MERCHANT-REFERRAL-BONUS-ID"] = config['merchant_referral_bonus_id'] if config['merchant_referral_bonus_id']
|
51
52
|
|
52
53
|
end
|
53
54
|
end
|
data/lib/response.rb
CHANGED
@@ -27,12 +27,18 @@ module PaypalAdaptive
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def approve_paypal_payment_url
|
31
|
-
self['payKey'].nil?
|
30
|
+
def approve_paypal_payment_url(type=nil)
|
31
|
+
if self['payKey'].nil?
|
32
|
+
return nil
|
33
|
+
elsif ['mini', 'embedded'].include?(type.to_s)
|
34
|
+
return "#{@@paypal_base_url}/webapps/adaptivepayment/flow/pay?expType=#{type.to_s}&paykey=#{self['payKey']}"
|
35
|
+
end
|
36
|
+
|
37
|
+
"#{@@paypal_base_url}/webscr?cmd=_ap-payment&paykey=#{self['payKey']}"
|
32
38
|
end
|
33
39
|
|
34
40
|
def preapproval_paypal_payment_url
|
35
41
|
self['preapprovalKey'].nil? ? nil : "#{@@paypal_base_url}/webscr?cmd=_ap-preapproval&preapprovalkey=#{self['preapprovalKey']}"
|
36
42
|
end
|
37
43
|
end
|
38
|
-
end
|
44
|
+
end
|
metadata
CHANGED
@@ -1,63 +1,48 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: astrails-paypal_adaptive
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 5
|
10
|
-
version: 0.1.5
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Tommy Chheng
|
14
9
|
- Ross Hale
|
15
10
|
- Boris Nadion
|
16
11
|
autorequire:
|
17
12
|
bindir: bin
|
18
13
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
dependencies:
|
23
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2011-11-13 00:00:00.000000000Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
24
17
|
name: json
|
25
|
-
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirement: &70194208137360 !ruby/object:Gem::Requirement
|
27
19
|
none: false
|
28
|
-
requirements:
|
29
|
-
- -
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
|
32
|
-
segments:
|
33
|
-
- 0
|
34
|
-
version: "0"
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0'
|
35
24
|
type: :development
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: jsonschema
|
39
25
|
prerelease: false
|
40
|
-
|
26
|
+
version_requirements: *70194208137360
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jsonschema
|
29
|
+
requirement: &70194208136800 !ruby/object:Gem::Requirement
|
41
30
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
version: "0"
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
49
35
|
type: :development
|
50
|
-
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: *70194208136800
|
51
38
|
description: Lightweight wrapper for Paypal's Adaptive Payments API.
|
52
39
|
email: boris@astrails.com
|
53
40
|
executables: []
|
54
|
-
|
55
41
|
extensions: []
|
56
|
-
|
57
|
-
extra_rdoc_files:
|
42
|
+
extra_rdoc_files:
|
58
43
|
- LICENSE
|
59
44
|
- README.markdown
|
60
|
-
files:
|
45
|
+
files:
|
61
46
|
- LICENSE
|
62
47
|
- README.markdown
|
63
48
|
- Rakefile
|
@@ -86,39 +71,28 @@ files:
|
|
86
71
|
- test/pay_request_test.rb
|
87
72
|
- test/payment_details_test.rb
|
88
73
|
- test/preapproval_test.rb
|
89
|
-
has_rdoc: true
|
90
74
|
homepage: http://github.com/astrails/paypal_adaptive
|
91
75
|
licenses: []
|
92
|
-
|
93
76
|
post_install_message:
|
94
77
|
rdoc_options: []
|
95
|
-
|
96
|
-
require_paths:
|
78
|
+
require_paths:
|
97
79
|
- lib
|
98
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
99
81
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
|
105
|
-
- 0
|
106
|
-
version: "0"
|
107
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
87
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
|
113
|
-
segments:
|
114
|
-
- 0
|
115
|
-
version: "0"
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
116
92
|
requirements: []
|
117
|
-
|
118
93
|
rubyforge_project:
|
119
|
-
rubygems_version: 1.
|
94
|
+
rubygems_version: 1.8.15
|
120
95
|
signing_key:
|
121
96
|
specification_version: 3
|
122
97
|
summary: initial import
|
123
98
|
test_files: []
|
124
|
-
|