paypal-recurring 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +8 -8
- data/lib/paypal/recurring/notification.rb +6 -1
- data/lib/paypal/recurring/response/checkout.rb +1 -1
- data/lib/paypal/recurring/version.rb +1 -1
- data/spec/paypal/notification_spec.rb +5 -5
- data/spec/paypal/response/checkout_spec.rb +1 -1
- data/spec/paypal/response/update_recurring_profile_spec.rb +1 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paypal-recurring (1.
|
4
|
+
paypal-recurring (1.1.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: http://rubygems.org/
|
@@ -21,14 +21,14 @@ GEM
|
|
21
21
|
method_source (~> 0.7.1)
|
22
22
|
slop (>= 2.4.4, < 3)
|
23
23
|
rake (0.9.2.2)
|
24
|
-
rspec (2.
|
25
|
-
rspec-core (~> 2.
|
26
|
-
rspec-expectations (~> 2.
|
27
|
-
rspec-mocks (~> 2.
|
28
|
-
rspec-core (2.
|
29
|
-
rspec-expectations (2.
|
24
|
+
rspec (2.10.0)
|
25
|
+
rspec-core (~> 2.10.0)
|
26
|
+
rspec-expectations (~> 2.10.0)
|
27
|
+
rspec-mocks (~> 2.10.0)
|
28
|
+
rspec-core (2.10.1)
|
29
|
+
rspec-expectations (2.10.0)
|
30
30
|
diff-lcs (~> 1.1.3)
|
31
|
-
rspec-mocks (2.
|
31
|
+
rspec-mocks (2.10.1)
|
32
32
|
slop (2.4.4)
|
33
33
|
vcr (2.1.0)
|
34
34
|
|
@@ -16,7 +16,8 @@ module PayPal
|
|
16
16
|
:status => :payment_status,
|
17
17
|
:pending_reason => :pending_reason,
|
18
18
|
:profile_status => :profile_status,
|
19
|
-
:payment_date =>
|
19
|
+
:payment_date => :payment_date,
|
20
|
+
:time_created => :time_created,
|
20
21
|
:seller_id => :receiver_id,
|
21
22
|
:email => :receiver_email,
|
22
23
|
:initial_amount => :initial_payment_amount,
|
@@ -71,6 +72,10 @@ module PayPal
|
|
71
72
|
self.class.convert_to_time(payment_date) if payment_date
|
72
73
|
end
|
73
74
|
|
75
|
+
def created_at
|
76
|
+
self.class.convert_to_time(time_created) if time_created
|
77
|
+
end
|
78
|
+
|
74
79
|
def verified?
|
75
80
|
response.body == "VERIFIED"
|
76
81
|
end
|
@@ -21,17 +21,17 @@ describe PayPal::Recurring::Notification do
|
|
21
21
|
subject.paid_at.strftime("%Y-%m-%d %H:%M:%S").should == "2011-07-05 03:37:06"
|
22
22
|
end
|
23
23
|
|
24
|
+
it "normalizes creation date" do
|
25
|
+
subject.params[:time_created] = "20:37:06 Jul 04, 2011 PDT" # PDT = -0700
|
26
|
+
subject.created_at.strftime("%Y-%m-%d %H:%M:%S").should == "2011-07-05 03:37:06"
|
27
|
+
end
|
28
|
+
|
24
29
|
it "returns currency" do
|
25
30
|
subject.params[:mc_currency] = "BRL"
|
26
31
|
subject.currency.should == "BRL"
|
27
32
|
end
|
28
33
|
|
29
34
|
describe "#payment_date" do
|
30
|
-
it "returns date from time_created field" do
|
31
|
-
subject.params[:time_created] = "2011-07-05"
|
32
|
-
subject.payment_date.should == "2011-07-05"
|
33
|
-
end
|
34
|
-
|
35
35
|
it "returns date from payment_date field" do
|
36
36
|
subject.params[:payment_date] = "2011-07-05"
|
37
37
|
subject.payment_date.should == "2011-07-05"
|
@@ -19,7 +19,7 @@ describe PayPal::Recurring::Response::Checkout do
|
|
19
19
|
|
20
20
|
its(:valid?) { should be_true }
|
21
21
|
its(:errors) { should be_empty }
|
22
|
-
its(:checkout_url) { should == "#{PayPal::Recurring.site_endpoint}?cmd=_express-checkout&token=EC-6K296451S2213041J" }
|
22
|
+
its(:checkout_url) { should == "#{PayPal::Recurring.site_endpoint}?cmd=_express-checkout&token=EC-6K296451S2213041J&useraction=commit" }
|
23
23
|
end
|
24
24
|
|
25
25
|
context "when failure" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal-recurring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -212,7 +212,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
212
212
|
version: '0'
|
213
213
|
segments:
|
214
214
|
- 0
|
215
|
-
hash:
|
215
|
+
hash: -3967038821678212643
|
216
216
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
217
|
none: false
|
218
218
|
requirements:
|
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
segments:
|
223
223
|
- 0
|
224
|
-
hash:
|
224
|
+
hash: -3967038821678212643
|
225
225
|
requirements: []
|
226
226
|
rubyforge_project:
|
227
227
|
rubygems_version: 1.8.23
|