paypal_adaptive 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +3 -0
- data/VERSION +1 -1
- data/lib/response.rb +4 -1
- data/paypal_adaptive.gemspec +2 -2
- data/test/preapproval_test.rb +4 -0
- metadata +2 -2
data/README.markdown
CHANGED
@@ -70,6 +70,9 @@ Additionally, you can make calls to Paypal Adaptive's other APIs:
|
|
70
70
|
Input is just a Hash just like the pay method. Refer to the Paypal manual for more details.
|
71
71
|
|
72
72
|
## Changelog
|
73
|
+
0.0.5
|
74
|
+
Added Preapproval preapproval_paypal_payment_url along with test case.
|
75
|
+
|
73
76
|
0.0.4
|
74
77
|
Preapproval now returns a PaypalAdaptive::Response class. Added preapproval test cases.
|
75
78
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/response.rb
CHANGED
@@ -28,8 +28,11 @@ module PaypalAdaptive
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def approve_paypal_payment_url
|
31
|
-
"#{@@paypal_base_url}/webscr?cmd=_ap-payment&paykey=#{self['payKey']}"
|
31
|
+
self['payKey'].nil? ? nil : "#{@@paypal_base_url}/webscr?cmd=_ap-payment&paykey=#{self['payKey']}"
|
32
32
|
end
|
33
33
|
|
34
|
+
def preapproval_paypal_payment_url
|
35
|
+
self['preapprovalKey'].nil? ? nil : "#{@@paypal_base_url}/webscr?cmd=_ap-preapproval&preapprovalkey=#{self['preapprovalKey']}"
|
36
|
+
end
|
34
37
|
end
|
35
38
|
end
|
data/paypal_adaptive.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{paypal_adaptive}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.5"
|
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"]
|
12
|
-
s.date = %q{2009-12-
|
12
|
+
s.date = %q{2009-12-30}
|
13
13
|
s.description = %q{Lightweight wrapper for Paypal's Adaptive Payments API.}
|
14
14
|
s.email = %q{tommy.chheng@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/test/preapproval_test.rb
CHANGED
@@ -15,6 +15,8 @@ class PreapprovalTest < Test::Unit::TestCase
|
|
15
15
|
pp_response = @preapproval_request.preapproval(data)
|
16
16
|
puts "preapproval code is #{pp_response['preapprovalKey']}"
|
17
17
|
|
18
|
+
assert pp_response.success?
|
19
|
+
assert_not_nil pp_response.preapproval_paypal_payment_url
|
18
20
|
assert_not_nil pp_response['preapprovalKey']
|
19
21
|
end
|
20
22
|
|
@@ -28,6 +30,8 @@ class PreapprovalTest < Test::Unit::TestCase
|
|
28
30
|
pp_response = @preapproval_request.preapproval(data)
|
29
31
|
puts "error message is #{pp_response.error_message}"
|
30
32
|
|
33
|
+
assert pp_response.success? == false
|
34
|
+
assert_nil pp_response.preapproval_paypal_payment_url
|
31
35
|
assert_nil pp_response['preapprovalKey']
|
32
36
|
end
|
33
37
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal_adaptive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommy Chheng
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-30 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|