wepay-rails 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -4,7 +4,7 @@ class Wepay::IpnController < Wepay::ApplicationController
4
4
  record = WepayCheckoutRecord.find_by_checkout_id(params[:checkout_id])
5
5
 
6
6
  if record.present?
7
- wepay_gateway.access_token(record)
7
+ wepay_gateway.access_token(record.auth_code)
8
8
  checkout = wepay_gateway.lookup_checkout(record.checkout_id)
9
9
  record.update_attributes(checkout)
10
10
  render :text => 'ok'
@@ -12,4 +12,4 @@ class Wepay::IpnController < Wepay::ApplicationController
12
12
  raise StandardError.new("Wepay IPN: No record found for checkout_id #{params[:checkout_id]}")
13
13
  end
14
14
  end
15
- end
15
+ end
data/lib/wepay-rails.rb CHANGED
@@ -70,7 +70,11 @@ module WepayRails
70
70
  end
71
71
 
72
72
  def access_token(wepayable_object)
73
- auth_code = wepayable_object.send(WepayRails::Configuration.wepayable_column.to_s)
73
+ auth_code = if wepayable_object.is_a?(String)
74
+ wepayable_object
75
+ else
76
+ wepayable_object.send(WepayRails::Configuration.wepayable_column.to_s)
77
+ end
74
78
  params = {
75
79
  :client_id => @wepay_config[:client_id],
76
80
  :client_secret => @wepay_config[:client_secret],
data/wepay-rails.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "wepay-rails"
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adam Medeiros"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wepay-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-25 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: &24572180 !ruby/object:Gem::Requirement
16
+ requirement: &11906740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *24572180
24
+ version_requirements: *11906740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: shoulda
27
- requirement: &24569700 !ruby/object:Gem::Requirement
27
+ requirement: &11904700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *24569700
35
+ version_requirements: *11904700
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &24537240 !ruby/object:Gem::Requirement
38
+ requirement: &11872720 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *24537240
46
+ version_requirements: *11872720
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &24534500 !ruby/object:Gem::Requirement
49
+ requirement: &11870520 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.6.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *24534500
57
+ version_requirements: *11870520
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rcov
60
- requirement: &24531780 !ruby/object:Gem::Requirement
60
+ requirement: &11868020 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *24531780
68
+ version_requirements: *11868020
69
69
  description: Rails gem that interfaces with the WePay API
70
70
  email: adammede@gmail.com
71
71
  executables: []
@@ -113,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  segments:
115
115
  - 0
116
- hash: -326143609003264246
116
+ hash: 4311350696441000345
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements: