paypal_adaptive 0.3.4 → 0.3.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.
- checksums.yaml +15 -0
- data/README.markdown +3 -0
- data/lib/paypal_adaptive/config.rb +7 -1
- data/lib/paypal_adaptive/ipn_notification.rb +2 -1
- data/lib/paypal_adaptive/request.rb +2 -1
- data/lib/paypal_adaptive/version.rb +1 -1
- metadata +6 -15
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NGJlNjc4YTY2Y2Y2M2M4MzkwZDk5MWRiZmM3MGJkOGE0OWEzZWZjMg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZmE5NGRkMTI1ZTVkZTVkNjA1YWM1MmQ1NjkwZWE3ZTdkY2E3ZThhZg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MzgxZmRhMzkxMTJlODk3MmExYjc0MmRiMDNhZGNlZWYxZmEyMDQ3NzU5MjFm
|
10
|
+
Nzg2MDNlODI2YmQ0ZGJiYmZhNGM4YzY2Mzk3NGRhODQyNjY3MmE5MGZkMzFj
|
11
|
+
NTQ5MTk4ZWYwODBiNjFiM2UyMzAwODFjZTFiMTQ0MTkyMDUyNjQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZGMwMjU1OTkxNWViNzc2ODc1ODdhY2QxOTJjOTgwZDhlMDYzNjdlZTk1MjNl
|
14
|
+
NmY0YjMzMDY4NGRiODEwNWE3MDZjMTBmY2NlMDU1YWIzOWQwYmYwMDk3Mjdl
|
15
|
+
YTM5OWZkMjMwN2QxNDRmMDU1MGUxM2JmNDEyZTI3NzllNjVlOTA=
|
data/README.markdown
CHANGED
@@ -96,6 +96,9 @@ for each environment, e.g.:
|
|
96
96
|
The api_cert_file should point to your cert_key_pem.txt that is downloaded through the paypal developer interface. It will contain a section that specifies the RSA private key and another section that specifies a certificate. If this is left empty, paypal_adaptive will attempt to use the signature method of validation with PayPal, so your signature config must not be nil.
|
97
97
|
|
98
98
|
## Changelog
|
99
|
+
0.3.5
|
100
|
+
SSL verify mode set to none for sandbox testing. thanks @mikong
|
101
|
+
|
99
102
|
0.3.4
|
100
103
|
Locale specific paypal urls and improved testing. changed approve_paypal_payment_url method signature with deprecation warning. thanks mreinsch.
|
101
104
|
|
@@ -15,7 +15,8 @@ module PaypalAdaptive
|
|
15
15
|
:beta_sandbox => "https://svcs.beta-sandbox.paypal.com"
|
16
16
|
} unless defined? API_BASE_URL_MAPPING
|
17
17
|
|
18
|
-
attr_accessor :paypal_base_url, :api_base_url, :headers, :ssl_cert_path, :ssl_cert_file, :api_cert_file
|
18
|
+
attr_accessor :paypal_base_url, :api_base_url, :headers, :ssl_cert_path, :ssl_cert_file, :api_cert_file,
|
19
|
+
:verify_mode
|
19
20
|
|
20
21
|
def initialize(env=nil, config_override={})
|
21
22
|
config = YAML.load(ERB.new(File.new(config_filepath).read).result)[env]
|
@@ -48,6 +49,11 @@ module PaypalAdaptive
|
|
48
49
|
@ssl_cert_path = config['ssl_cert_path'] unless config['ssl_cert_path'].blank?
|
49
50
|
@ssl_cert_file = config['ssl_cert_file'] unless config['ssl_cert_file'].blank?
|
50
51
|
@api_cert_file = config['api_cert_file'] unless config['api_cert_file'].blank?
|
52
|
+
@verify_mode = if pp_env == :sandbox
|
53
|
+
OpenSSL::SSL::VERIFY_NONE
|
54
|
+
else
|
55
|
+
OpenSSL::SSL::VERIFY_PEER
|
56
|
+
end
|
51
57
|
end
|
52
58
|
end
|
53
59
|
|
@@ -11,6 +11,7 @@ module PaypalAdaptive
|
|
11
11
|
@ssl_cert_path = config.ssl_cert_path
|
12
12
|
@ssl_cert_file = config.ssl_cert_file
|
13
13
|
@api_cert_file = config.api_cert_file
|
14
|
+
@verify_mode = config.verify_mode
|
14
15
|
end
|
15
16
|
|
16
17
|
def send_back(data)
|
@@ -18,7 +19,7 @@ module PaypalAdaptive
|
|
18
19
|
url = URI.parse @paypal_base_url
|
19
20
|
http = Net::HTTP.new(url.host, 443)
|
20
21
|
http.use_ssl = true
|
21
|
-
http.verify_mode =
|
22
|
+
http.verify_mode = @verify_mode
|
22
23
|
http.ca_path = @ssl_cert_path unless @ssl_cert_path.nil?
|
23
24
|
|
24
25
|
if @api_cert_file
|
@@ -15,6 +15,7 @@ module PaypalAdaptive
|
|
15
15
|
@ssl_cert_path = config.ssl_cert_path
|
16
16
|
@ssl_cert_file = config.ssl_cert_file
|
17
17
|
@api_cert_file = config.api_cert_file
|
18
|
+
@verify_mode = config.verify_mode
|
18
19
|
end
|
19
20
|
|
20
21
|
def validate
|
@@ -90,7 +91,7 @@ module PaypalAdaptive
|
|
90
91
|
url = URI.parse @api_base_url
|
91
92
|
http = Net::HTTP.new(url.host, 443)
|
92
93
|
http.use_ssl = true
|
93
|
-
http.verify_mode =
|
94
|
+
http.verify_mode = @verify_mode
|
94
95
|
|
95
96
|
if @api_cert_file
|
96
97
|
cert = File.read(@api_cert_file)
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal_adaptive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tommy Chheng
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: jsonschema
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: activesupport
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -125,27 +116,26 @@ files:
|
|
125
116
|
- test/unit/request_test.rb
|
126
117
|
homepage: http://github.com/tc/paypal_adaptive
|
127
118
|
licenses: []
|
119
|
+
metadata: {}
|
128
120
|
post_install_message:
|
129
121
|
rdoc_options: []
|
130
122
|
require_paths:
|
131
123
|
- lib
|
132
124
|
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
-
none: false
|
134
125
|
requirements:
|
135
126
|
- - ! '>='
|
136
127
|
- !ruby/object:Gem::Version
|
137
128
|
version: '0'
|
138
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
-
none: false
|
140
130
|
requirements:
|
141
131
|
- - ! '>='
|
142
132
|
- !ruby/object:Gem::Version
|
143
133
|
version: '0'
|
144
134
|
requirements: []
|
145
135
|
rubyforge_project: paypal_adaptive
|
146
|
-
rubygems_version:
|
136
|
+
rubygems_version: 2.0.2
|
147
137
|
signing_key:
|
148
|
-
specification_version:
|
138
|
+
specification_version: 4
|
149
139
|
summary: Lightweight wrapper for Paypal's Adaptive Payments API
|
150
140
|
test_files:
|
151
141
|
- test/data/invalid_chain_pay_request.json
|
@@ -173,3 +163,4 @@ test_files:
|
|
173
163
|
- test/unit/payment_options_test.rb
|
174
164
|
- test/unit/preapproval_test.rb
|
175
165
|
- test/unit/request_test.rb
|
166
|
+
has_rdoc:
|