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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paypal-recurring (1.0.0)
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.9.0)
25
- rspec-core (~> 2.9.0)
26
- rspec-expectations (~> 2.9.0)
27
- rspec-mocks (~> 2.9.0)
28
- rspec-core (2.9.0)
29
- rspec-expectations (2.9.1)
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.9.0)
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 => [:time_created, :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
@@ -3,7 +3,7 @@ module PayPal
3
3
  module Response
4
4
  class Checkout < Base
5
5
  def checkout_url
6
- "#{PayPal::Recurring.site_endpoint}?cmd=_express-checkout&token=#{token}"
6
+ "#{PayPal::Recurring.site_endpoint}?cmd=_express-checkout&token=#{token}&useraction=commit"
7
7
  end
8
8
  end
9
9
  end
@@ -2,7 +2,7 @@ module PayPal
2
2
  module Recurring
3
3
  module Version
4
4
  MAJOR = 1
5
- MINOR = 0
5
+ MINOR = 1
6
6
  PATCH = 0
7
7
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
8
8
  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
@@ -33,6 +33,7 @@ describe PayPal::Recurring::Response::Profile do
33
33
 
34
34
  context "when failure" do
35
35
  use_vcr_cassette("update_profile/failure")
36
+
36
37
  let(:paypal) {
37
38
  PayPal::Recurring.new({
38
39
  :profile_id => "I-W4FNTE6EXJ2W",
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.0.0
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-04-23 00:00:00.000000000 Z
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: 4504351682003461961
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: 4504351682003461961
224
+ hash: -3967038821678212643
225
225
  requirements: []
226
226
  rubyforge_project:
227
227
  rubygems_version: 1.8.23