astrails-paypal_adaptive 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/astrails-paypal_adaptive.gemspec +1 -1
- data/lib/ipn_notification.rb +4 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -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.3"
|
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/ipn_notification.rb
CHANGED
@@ -13,13 +13,17 @@ module PaypalAdaptive
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def send_back(data)
|
16
|
+
logger = data.delete(:logger) || data.delete("logger")
|
16
17
|
data = "cmd=_notify-validate&#{data}"
|
17
18
|
url = URI.parse @@paypal_base_url
|
18
19
|
http = Net::HTTP.new(url.host, 443)
|
19
20
|
http.use_ssl = (url.scheme == 'https')
|
20
21
|
|
21
22
|
path = "#{@@paypal_base_url}/cgi-bin/webscr"
|
23
|
+
|
24
|
+
logger.request(path, data, "") if logger
|
22
25
|
resp, response_data = http.post(path, data)
|
26
|
+
logger.response(resp.code, response_data) if logger
|
23
27
|
|
24
28
|
@verified = response_data == "VERIFIED"
|
25
29
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: astrails-paypal_adaptive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tommy Chheng
|