wepay-rails 0.1.70 → 0.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/controllers/wepay/application_controller.rb +3 -0
- data/app/controllers/wepay/ipn_controller.rb +17 -0
- data/config/routes.rb +5 -0
- data/lib/examples/wepay.yml +43 -12
- data/lib/rails.rb +5 -0
- data/lib/wepay-rails.rb +3 -0
- data/wepay-rails.gemspec +6 -2
- metadata +17 -13
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.71
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class Wepay::IpnController < Wepay::ApplicationController
|
2
|
+
def index
|
3
|
+
raise StandardError.new("A model needs to exist to trap the IPN messages from Wepay. Please create a model (eg. WepayCheckoutRecord) and set the class name in your wepay.yml, wepay_checkout_model directive") if @config[:wepay_checkout_model].blank?
|
4
|
+
|
5
|
+
klass = @config[:wepay_checkout_model]
|
6
|
+
record = klass.find_by_checkout_id(params[:checkout_id])
|
7
|
+
|
8
|
+
if record.present?
|
9
|
+
record.update_attributes(params)
|
10
|
+
else
|
11
|
+
model = klass.new
|
12
|
+
model.save!
|
13
|
+
end
|
14
|
+
|
15
|
+
render :text => 'ok'
|
16
|
+
end
|
17
|
+
end
|
data/config/routes.rb
ADDED
data/lib/examples/wepay.yml
CHANGED
@@ -1,24 +1,55 @@
|
|
1
1
|
production:
|
2
|
-
client_id: <your
|
3
|
-
client_secret: <your
|
4
|
-
|
2
|
+
client_id: <your client_id from wepay>
|
3
|
+
client_secret: <your client_secret from wepay>
|
4
|
+
authorize_redirect_uri: "http://www.example.com/wepay/authorize"
|
5
5
|
scope: ['refund_payments','collect_payments','view_balance','view_user']
|
6
6
|
#wepay_api_uri: "https://api.wepay.com"
|
7
7
|
wepay_api_uri: "https://stage.wepay.com"
|
8
8
|
wepay_api_version: "v2"
|
9
|
-
|
9
|
+
ipn_callback_uri: "http://www.example.com/wepay/ipn"
|
10
|
+
checkout_redirect_uri: "http://www.noisebytes.com/purchase/finalize"
|
11
|
+
fee_payer: Payee
|
12
|
+
checkout_type: GOODS
|
13
|
+
charge_tax: false
|
14
|
+
app_fee: 0
|
15
|
+
auto_capture: true
|
16
|
+
require_shipping: false
|
17
|
+
shipping_fee: 0
|
18
|
+
charge_tax: false
|
19
|
+
wepay_checkout_model: WepayCheckoutRecord
|
10
20
|
development:
|
11
|
-
client_id:
|
12
|
-
client_secret:
|
13
|
-
redirect_uri: "http://
|
21
|
+
client_id: <your client_id from wepay>
|
22
|
+
client_secret: <your client_secret from wepay>
|
23
|
+
redirect_uri: "http://dev.noisebytes.com/wepay/authorize"
|
14
24
|
scope: ['refund_payments','collect_payments','view_balance','view_user']
|
15
25
|
wepay_api_uri: "https://stage.wepay.com"
|
16
26
|
wepay_api_version: "v2"
|
17
|
-
|
27
|
+
ipn_callback_uri: "http://dev.noisebytes.com/wepay/ipn"
|
28
|
+
checkout_redirect_uri: "http://dev.noisebytes.com/purchase/finalize"
|
29
|
+
fee_payer: Payee
|
30
|
+
checkout_type: GOODS
|
31
|
+
charge_tax: false
|
32
|
+
app_fee: 0
|
33
|
+
require_shipping: false
|
34
|
+
shipping_fee: 0
|
35
|
+
charge_tax: false
|
36
|
+
auto_capture: true
|
37
|
+
wepay_checkout_model: WepayCheckoutRecord
|
18
38
|
test:
|
19
|
-
client_id:
|
20
|
-
client_secret:
|
21
|
-
redirect_uri: "http://
|
39
|
+
client_id: <your client_id from wepay>
|
40
|
+
client_secret: <your client_secret from wepay>
|
41
|
+
redirect_uri: "http://dev.noisebytes.com/wepay/authorize"
|
22
42
|
scope: ['refund_payments','collect_payments','view_balance','view_user']
|
23
43
|
wepay_api_uri: "https://stage.wepay.com"
|
24
|
-
wepay_api_version: "v2"
|
44
|
+
wepay_api_version: "v2"
|
45
|
+
ipn_callback_uri: "http://test.noisebytes.com/wepay/ipn"
|
46
|
+
checkout_redirect_uri: "http://dev.noisebytes.com/purchase/finalize"
|
47
|
+
fee_payer: Payee
|
48
|
+
checkout_type: GOODS
|
49
|
+
charge_tax: false
|
50
|
+
app_fee: 0
|
51
|
+
auto_capture: true
|
52
|
+
charge_tax: false
|
53
|
+
require_shipping: false
|
54
|
+
shipping_fee: 0
|
55
|
+
wepay_checkout_model: WepayCheckoutRecord
|
data/lib/rails.rb
ADDED
data/lib/wepay-rails.rb
CHANGED
data/wepay-rails.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{wepay-rails}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.71"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Adam Medeiros}]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-09-01}
|
13
13
|
s.description = %q{Rails gem that interfaces with the WePay API}
|
14
14
|
s.email = %q{adammede@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -26,9 +26,13 @@ Gem::Specification.new do |s|
|
|
26
26
|
"README.rdoc",
|
27
27
|
"Rakefile",
|
28
28
|
"VERSION",
|
29
|
+
"app/controllers/wepay/application_controller.rb",
|
30
|
+
"app/controllers/wepay/ipn_controller.rb",
|
31
|
+
"config/routes.rb",
|
29
32
|
"lib/examples/wepay.yml",
|
30
33
|
"lib/helpers/controller_helpers.rb",
|
31
34
|
"lib/helpers/model_helpers.rb",
|
35
|
+
"lib/rails.rb",
|
32
36
|
"lib/wepay-rails.rb",
|
33
37
|
"test/helper.rb",
|
34
38
|
"test/test_wepay-rails.rb",
|
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.1.
|
4
|
+
version: 0.1.71
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-09-01 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement: &
|
16
|
+
requirement: &19596200 !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: *
|
24
|
+
version_requirements: *19596200
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: shoulda
|
27
|
-
requirement: &
|
27
|
+
requirement: &19594820 !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: *
|
35
|
+
version_requirements: *19594820
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &19593560 !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: *
|
46
|
+
version_requirements: *19593560
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &19592080 !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: *
|
57
|
+
version_requirements: *19592080
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rcov
|
60
|
-
requirement: &
|
60
|
+
requirement: &19590700 !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: *
|
68
|
+
version_requirements: *19590700
|
69
69
|
description: Rails gem that interfaces with the WePay API
|
70
70
|
email: adammede@gmail.com
|
71
71
|
executables: []
|
@@ -83,9 +83,13 @@ files:
|
|
83
83
|
- README.rdoc
|
84
84
|
- Rakefile
|
85
85
|
- VERSION
|
86
|
+
- app/controllers/wepay/application_controller.rb
|
87
|
+
- app/controllers/wepay/ipn_controller.rb
|
88
|
+
- config/routes.rb
|
86
89
|
- lib/examples/wepay.yml
|
87
90
|
- lib/helpers/controller_helpers.rb
|
88
91
|
- lib/helpers/model_helpers.rb
|
92
|
+
- lib/rails.rb
|
89
93
|
- lib/wepay-rails.rb
|
90
94
|
- test/helper.rb
|
91
95
|
- test/test_wepay-rails.rb
|
@@ -105,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
109
|
version: '0'
|
106
110
|
segments:
|
107
111
|
- 0
|
108
|
-
hash:
|
112
|
+
hash: 2634019205423654698
|
109
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
114
|
none: false
|
111
115
|
requirements:
|