wepay-rails 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -108,6 +108,8 @@ wepay to get the checkout info - whatever you want to do (See the wiki for more
|
|
108
108
|
|
109
109
|
== Special Thanks to additional contributers of Wepay-Rails
|
110
110
|
* lucisferre (Chris Nicola) https://github.com/lucisferre
|
111
|
+
* mindeavor (Gilbert) https://github.com/mindeavor
|
112
|
+
* ustorf (Bernd Ustorf) https://github.com/ustorf
|
111
113
|
|
112
114
|
|
113
115
|
== Contributing to wepay-rails
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.5
|
@@ -26,6 +26,8 @@ class CreateWepayCheckoutRecords < ActiveRecord::Migration
|
|
26
26
|
t.text :shipping_address
|
27
27
|
t.decimal :tax
|
28
28
|
t.string :security_token
|
29
|
+
t.string :access_token
|
30
|
+
t.string :mode
|
29
31
|
|
30
32
|
t.timestamps
|
31
33
|
end
|
@@ -36,4 +38,4 @@ class CreateWepayCheckoutRecords < ActiveRecord::Migration
|
|
36
38
|
def self.down
|
37
39
|
drop_table :wepay_checkout_records
|
38
40
|
end
|
39
|
-
end
|
41
|
+
end
|
@@ -6,7 +6,7 @@ production:
|
|
6
6
|
root_callback_uri: "http://www.example.com"
|
7
7
|
after_checkout_redirect_uri: "http://www.example.com/purchase/finalize"
|
8
8
|
scope: [refund_payments,collect_payments,view_balance,view_user]
|
9
|
-
wepay_api_uri: "https://
|
9
|
+
wepay_api_uri: "https://www.wepay.com/v2"
|
10
10
|
fee_payer: Payee
|
11
11
|
checkout_type: GOODS
|
12
12
|
charge_tax: false
|
@@ -23,7 +23,7 @@ development:
|
|
23
23
|
root_callback_uri: "http://www.example.com"
|
24
24
|
after_checkout_redirect_uri: "http://www.example.com/purchase/finalize"
|
25
25
|
scope: [refund_payments,collect_payments,view_balance,view_user]
|
26
|
-
wepay_api_uri: "https://
|
26
|
+
wepay_api_uri: "https://stage.wepay.com/v2"
|
27
27
|
fee_payer: Payee
|
28
28
|
checkout_type: GOODS
|
29
29
|
charge_tax: false
|
@@ -40,7 +40,7 @@ test:
|
|
40
40
|
root_callback_uri: "http://www.example.com"
|
41
41
|
after_checkout_redirect_uri: "http://www.example.com/purchase/finalize"
|
42
42
|
scope: [refund_payments,collect_payments,view_balance,view_user]
|
43
|
-
wepay_api_uri: "https://
|
43
|
+
wepay_api_uri: "https://stage.wepay.com/v2"
|
44
44
|
fee_payer: Payee
|
45
45
|
checkout_type: GOODS
|
46
46
|
charge_tax: false
|
@@ -37,7 +37,7 @@ module WepayRails
|
|
37
37
|
# :require_shipping No A boolean value (0 or 1). If set to 1 then the payer will be asked to enter a shipping address when they pay. After payment you can retrieve this shipping address by calling /checkout
|
38
38
|
# :shipping_fee No The amount that you want to charge for shipping.
|
39
39
|
# :charge_tax No A boolean value (0 or 1). If set to 1 and the account has a relevant tax entry (see /account/set_tax), then tax will be charged.
|
40
|
-
def
|
40
|
+
def init_checkout(params, access_token=nil)
|
41
41
|
wepay_gateway = WepayRails::Payments::Gateway.new(access_token)
|
42
42
|
response = wepay_gateway.perform_checkout(params)
|
43
43
|
|
@@ -48,13 +48,19 @@ module WepayRails
|
|
48
48
|
params.merge!({
|
49
49
|
:access_token => wepay_gateway.access_token,
|
50
50
|
:checkout_id => response[:checkout_id],
|
51
|
-
:security_token => response[:security_token]
|
51
|
+
:security_token => response[:security_token],
|
52
|
+
:checkout_uri => response[:checkout_uri]
|
52
53
|
})
|
53
54
|
|
54
55
|
WepayCheckoutRecord.create(params)
|
56
|
+
end
|
55
57
|
|
56
|
-
|
58
|
+
def init_checkout_and_send_user_to_wepay(params, access_token=nil)
|
59
|
+
record = init_checkout(params, access_token)
|
60
|
+
redirect_to record.checkout_uri and return
|
57
61
|
end
|
62
|
+
|
63
|
+
|
58
64
|
end
|
59
65
|
end
|
60
66
|
end
|
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 = "2.2.
|
8
|
+
s.version = "2.2.5"
|
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{
|
12
|
+
s.date = %q{2012-04-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 = [
|
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: 2.2.
|
4
|
+
version: 2.2.5
|
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:
|
12
|
+
date: 2012-04-01 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement: &
|
16
|
+
requirement: &17209040 !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: *17209040
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: shoulda
|
27
|
-
requirement: &
|
27
|
+
requirement: &17205100 !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: *17205100
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &17180660 !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: *17180660
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &17178880 !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: *17178880
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rcov
|
60
|
-
requirement: &
|
60
|
+
requirement: &17177720 !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: *17177720
|
69
69
|
description: Rails gem that interfaces with the WePay API
|
70
70
|
email: adammede@gmail.com
|
71
71
|
executables: []
|
@@ -114,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
segments:
|
116
116
|
- 0
|
117
|
-
hash:
|
117
|
+
hash: 3961718149411940929
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
none: false
|
120
120
|
requirements:
|