tonyla-paypal_adaptive 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ipn_notification.rb +10 -2
- data/lib/request.rb +4 -1
- data/tonyla-paypal_adaptive.gemspec +1 -1
- metadata +4 -18
data/lib/ipn_notification.rb
CHANGED
@@ -20,8 +20,16 @@ module PaypalAdaptive
|
|
20
20
|
http = Net::HTTP.new(url.host, 443)
|
21
21
|
http.use_ssl = true
|
22
22
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
23
|
-
|
24
|
-
|
23
|
+
|
24
|
+
if @@ssl_cert_file
|
25
|
+
cert = File.read(@@ssl_cert_file)
|
26
|
+
http.cert = OpenSSL::X509::Certificate.new(cert)
|
27
|
+
http.key = OpenSSL::PKey::RSA.new(cert)
|
28
|
+
end
|
29
|
+
|
30
|
+
if ssl_ca_cert_path
|
31
|
+
http.ca_path = @@ssl_ca_cert_path unless @@ssl_ca_cert_path.nil? #/etc/ssl/certs'
|
32
|
+
end
|
25
33
|
|
26
34
|
path = "#{@@paypal_base_url}/cgi-bin/webscr"
|
27
35
|
resp, response_data = http.post(path, data)
|
data/lib/request.rb
CHANGED
@@ -86,10 +86,13 @@ module PaypalAdaptive
|
|
86
86
|
http.use_ssl = true
|
87
87
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
88
88
|
|
89
|
-
if @@
|
89
|
+
if @@ssl_cert_file
|
90
90
|
cert = File.read(@@ssl_cert_file)
|
91
91
|
http.cert = OpenSSL::X509::Certificate.new(cert)
|
92
92
|
http.key = OpenSSL::PKey::RSA.new(cert)
|
93
|
+
end
|
94
|
+
|
95
|
+
if @@ssl_ca_cert_path
|
93
96
|
http.ca_path = @@ssl_ca_cert_path unless @@ssl_ca_cert_path.nil? #/etc/ssl/certs'
|
94
97
|
end
|
95
98
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{tonyla-paypal_adaptive}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
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", "Tony La"]
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tonyla-paypal_adaptive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
version: 0.1.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.1
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Tommy Chheng
|
@@ -15,8 +11,7 @@ autorequire:
|
|
15
11
|
bindir: bin
|
16
12
|
cert_chain: []
|
17
13
|
|
18
|
-
date: 2011-05-21 00:00:00
|
19
|
-
default_executable:
|
14
|
+
date: 2011-05-21 00:00:00 Z
|
20
15
|
dependencies:
|
21
16
|
- !ruby/object:Gem::Dependency
|
22
17
|
name: json
|
@@ -26,8 +21,6 @@ dependencies:
|
|
26
21
|
requirements:
|
27
22
|
- - ">="
|
28
23
|
- !ruby/object:Gem::Version
|
29
|
-
segments:
|
30
|
-
- 0
|
31
24
|
version: "0"
|
32
25
|
type: :development
|
33
26
|
version_requirements: *id001
|
@@ -39,8 +32,6 @@ dependencies:
|
|
39
32
|
requirements:
|
40
33
|
- - ">="
|
41
34
|
- !ruby/object:Gem::Version
|
42
|
-
segments:
|
43
|
-
- 0
|
44
35
|
version: "0"
|
45
36
|
type: :development
|
46
37
|
version_requirements: *id002
|
@@ -82,7 +73,6 @@ files:
|
|
82
73
|
- test/unit/pay_request_test.rb
|
83
74
|
- test/unit/payment_details_test.rb
|
84
75
|
- test/unit/preapproval_test.rb
|
85
|
-
has_rdoc: true
|
86
76
|
homepage: http://github.com/tc/paypal_adaptive
|
87
77
|
licenses: []
|
88
78
|
|
@@ -96,21 +86,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
86
|
requirements:
|
97
87
|
- - ">="
|
98
88
|
- !ruby/object:Gem::Version
|
99
|
-
segments:
|
100
|
-
- 0
|
101
89
|
version: "0"
|
102
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
91
|
none: false
|
104
92
|
requirements:
|
105
93
|
- - ">="
|
106
94
|
- !ruby/object:Gem::Version
|
107
|
-
segments:
|
108
|
-
- 0
|
109
95
|
version: "0"
|
110
96
|
requirements: []
|
111
97
|
|
112
98
|
rubyforge_project:
|
113
|
-
rubygems_version: 1.
|
99
|
+
rubygems_version: 1.8.6
|
114
100
|
signing_key:
|
115
101
|
specification_version: 3
|
116
102
|
summary: initial import
|