paypal_nvp 0.1.9 → 0.2.0
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/Manifest +3 -3
- data/lib/paypal_nvp.rb +5 -3
- data/paypal_nvp.gemspec +1 -1
- metadata +8 -6
data/Manifest
CHANGED
data/lib/paypal_nvp.rb
CHANGED
@@ -10,6 +10,10 @@ class PaypalNVP
|
|
10
10
|
type = sandbox ? "sandbox" : "live"
|
11
11
|
config = YAML.load_file("#{RAILS_ROOT}/config/paypal.yml") rescue nil
|
12
12
|
@require_ssl_certs = extras[:require_ssl_certs].nil?
|
13
|
+
|
14
|
+
# by default we use the 50.0 API version
|
15
|
+
extras[:version] ||= "50.0"
|
16
|
+
|
13
17
|
if config
|
14
18
|
@url = config[type]["url"]
|
15
19
|
@user = config[type]["user"]
|
@@ -25,7 +29,7 @@ class PaypalNVP
|
|
25
29
|
end
|
26
30
|
|
27
31
|
def call_paypal(data)
|
28
|
-
data.merge!({ "USER" => @user, "PWD" => @pass, "SIGNATURE" => @cert
|
32
|
+
data.merge!({ "USER" => @user, "PWD" => @pass, "SIGNATURE" => @cert })
|
29
33
|
data.merge!(@extras)
|
30
34
|
qs = []
|
31
35
|
data.each do |key, value|
|
@@ -36,14 +40,12 @@ class PaypalNVP
|
|
36
40
|
uri = URI.parse(@url)
|
37
41
|
http = Net::HTTP.new(uri.host, uri.port)
|
38
42
|
http.use_ssl = true
|
39
|
-
# http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
40
43
|
rootCA = '/etc/ssl/certs'
|
41
44
|
if File.directory? rootCA
|
42
45
|
http.ca_path = rootCA
|
43
46
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
44
47
|
http.verify_depth = 5
|
45
48
|
else
|
46
|
-
#raise "missing ssl certs. Cannot secure paypal communication" if @require_ssl_certs == true
|
47
49
|
puts "WARNING: no ssl certs found. Paypal communication will be insecure. DO NOT DEPLOY"
|
48
50
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
49
51
|
end
|
data/paypal_nvp.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{paypal_nvp}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.2.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Olivier BONNAURE - Direct Interactive LLC"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal_nvp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Olivier BONNAURE - Direct Interactive LLC
|
@@ -15,7 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-05-28 00:00:00
|
18
|
+
date: 2010-05-28 00:00:00 +02:00
|
19
|
+
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
21
22
|
description: Paypal NVP API Class.
|
@@ -34,6 +35,7 @@ files:
|
|
34
35
|
- Rakefile
|
35
36
|
- README.rdoc
|
36
37
|
- paypal_nvp.gemspec
|
38
|
+
has_rdoc: true
|
37
39
|
homepage: http://github.com/solisoft/paypal_nvp
|
38
40
|
licenses: []
|
39
41
|
|
@@ -69,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
71
|
requirements: []
|
70
72
|
|
71
73
|
rubyforge_project: paypal_nvp
|
72
|
-
rubygems_version: 1.
|
74
|
+
rubygems_version: 1.6.2
|
73
75
|
signing_key:
|
74
76
|
specification_version: 3
|
75
77
|
summary: Paypal NVP API Class.
|