catarse_paypal_express 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/Gemfile.lock +63 -58
- data/config/initializers/register.rb +1 -11
- data/lib/catarse_paypal_express/payment_engine.rb +29 -0
- data/lib/catarse_paypal_express/version.rb +1 -1
- data/lib/catarse_paypal_express.rb +1 -0
- data/spec/support/payment_engines.rb +2 -0
- data/test/dummy/config/application.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e32edadcb0632c3fb8df93ef94b22de3f86e29c9
|
4
|
+
data.tar.gz: 2f8216ff7773b2fc95adbcb376edd09eaebc441e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e8fb84cd0db2185f5de230ee58856ddc5b7eae63265bf9af67efb64210291189c044ef93720f41fb06e59d487c134a4ab8920847e3025afcee8f8df4e2be440
|
7
|
+
data.tar.gz: 8ae78e4dd7605215098cafd10279d06bd9a4ebc8c89978ae13850735a5544adae9a0c90bce0669cdca22ffe1d5789f6c6a072c8faf623c79954c9f494a780bce
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
catarse_paypal_express (2.2.
|
4
|
+
catarse_paypal_express (2.2.2)
|
5
5
|
activemerchant (>= 1.34.0)
|
6
6
|
rails (~> 4.0)
|
7
7
|
slim-rails
|
@@ -9,103 +9,108 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionmailer (4.0.
|
13
|
-
actionpack (= 4.0.
|
14
|
-
mail (~> 2.5.
|
15
|
-
actionpack (4.0.
|
16
|
-
activesupport (= 4.0.
|
12
|
+
actionmailer (4.0.4)
|
13
|
+
actionpack (= 4.0.4)
|
14
|
+
mail (~> 2.5.4)
|
15
|
+
actionpack (4.0.4)
|
16
|
+
activesupport (= 4.0.4)
|
17
17
|
builder (~> 3.1.0)
|
18
18
|
erubis (~> 2.7.0)
|
19
19
|
rack (~> 1.5.2)
|
20
20
|
rack-test (~> 0.6.2)
|
21
|
-
active_utils (2.0.
|
21
|
+
active_utils (2.0.2)
|
22
22
|
activesupport (>= 2.3.11)
|
23
23
|
i18n
|
24
|
-
activemerchant (1.
|
25
|
-
active_utils (>=
|
26
|
-
activesupport (>= 2.3.14)
|
27
|
-
builder (>= 2.0.0)
|
28
|
-
i18n
|
29
|
-
json (
|
30
|
-
money
|
31
|
-
nokogiri (
|
32
|
-
activemodel (4.0.
|
33
|
-
activesupport (= 4.0.
|
24
|
+
activemerchant (1.42.6)
|
25
|
+
active_utils (~> 2.0, >= 2.0.1)
|
26
|
+
activesupport (>= 2.3.14, < 5.0.0)
|
27
|
+
builder (>= 2.1.2, < 4.0.0)
|
28
|
+
i18n (~> 0.5)
|
29
|
+
json (~> 1.7)
|
30
|
+
money (< 7.0.0)
|
31
|
+
nokogiri (~> 1.4)
|
32
|
+
activemodel (4.0.4)
|
33
|
+
activesupport (= 4.0.4)
|
34
34
|
builder (~> 3.1.0)
|
35
|
-
activerecord (4.0.
|
36
|
-
activemodel (= 4.0.
|
35
|
+
activerecord (4.0.4)
|
36
|
+
activemodel (= 4.0.4)
|
37
37
|
activerecord-deprecated_finders (~> 1.0.2)
|
38
|
-
activesupport (= 4.0.
|
38
|
+
activesupport (= 4.0.4)
|
39
39
|
arel (~> 4.0.0)
|
40
40
|
activerecord-deprecated_finders (1.0.3)
|
41
|
-
activesupport (4.0.
|
42
|
-
i18n (~> 0.6, >= 0.6.
|
41
|
+
activesupport (4.0.4)
|
42
|
+
i18n (~> 0.6, >= 0.6.9)
|
43
43
|
minitest (~> 4.2)
|
44
44
|
multi_json (~> 1.3)
|
45
45
|
thread_safe (~> 0.1)
|
46
46
|
tzinfo (~> 0.3.37)
|
47
|
-
arel (4.0.
|
48
|
-
atomic (1.1.
|
47
|
+
arel (4.0.2)
|
48
|
+
atomic (1.1.16)
|
49
49
|
builder (3.1.4)
|
50
|
-
database_cleaner (1.
|
51
|
-
diff-lcs (1.2.
|
50
|
+
database_cleaner (1.2.0)
|
51
|
+
diff-lcs (1.2.5)
|
52
52
|
erubis (2.7.0)
|
53
|
-
factory_girl (4.
|
53
|
+
factory_girl (4.4.0)
|
54
54
|
activesupport (>= 3.0.0)
|
55
|
-
factory_girl_rails (4.
|
56
|
-
factory_girl (~> 4.
|
55
|
+
factory_girl_rails (4.4.1)
|
56
|
+
factory_girl (~> 4.4.0)
|
57
57
|
railties (>= 3.0.0)
|
58
58
|
hike (1.2.3)
|
59
|
-
i18n (0.6.
|
60
|
-
json (1.8.
|
59
|
+
i18n (0.6.9)
|
60
|
+
json (1.8.1)
|
61
61
|
mail (2.5.4)
|
62
62
|
mime-types (~> 1.16)
|
63
63
|
treetop (~> 1.4.8)
|
64
64
|
mime-types (1.25.1)
|
65
|
+
mini_portile (0.5.2)
|
65
66
|
minitest (4.7.5)
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
67
|
+
monetize (0.1.4)
|
68
|
+
money (6.0.1)
|
69
|
+
i18n (~> 0.6.4)
|
70
|
+
monetize (~> 0.1.3)
|
71
|
+
multi_json (1.9.0)
|
72
|
+
nokogiri (1.6.1)
|
73
|
+
mini_portile (~> 0.5.0)
|
74
|
+
pg (0.17.1)
|
75
|
+
polyglot (0.3.4)
|
72
76
|
rack (1.5.2)
|
73
77
|
rack-test (0.6.2)
|
74
78
|
rack (>= 1.0)
|
75
|
-
rails (4.0.
|
76
|
-
actionmailer (= 4.0.
|
77
|
-
actionpack (= 4.0.
|
78
|
-
activerecord (= 4.0.
|
79
|
-
activesupport (= 4.0.
|
79
|
+
rails (4.0.4)
|
80
|
+
actionmailer (= 4.0.4)
|
81
|
+
actionpack (= 4.0.4)
|
82
|
+
activerecord (= 4.0.4)
|
83
|
+
activesupport (= 4.0.4)
|
80
84
|
bundler (>= 1.3.0, < 2.0)
|
81
|
-
railties (= 4.0.
|
85
|
+
railties (= 4.0.4)
|
82
86
|
sprockets-rails (~> 2.0.0)
|
83
|
-
railties (4.0.
|
84
|
-
actionpack (= 4.0.
|
85
|
-
activesupport (= 4.0.
|
87
|
+
railties (4.0.4)
|
88
|
+
actionpack (= 4.0.4)
|
89
|
+
activesupport (= 4.0.4)
|
86
90
|
rake (>= 0.8.7)
|
87
91
|
thor (>= 0.18.1, < 2.0)
|
88
|
-
rake (10.1.
|
89
|
-
rspec-core (2.14.
|
90
|
-
rspec-expectations (2.14.
|
92
|
+
rake (10.1.1)
|
93
|
+
rspec-core (2.14.8)
|
94
|
+
rspec-expectations (2.14.5)
|
91
95
|
diff-lcs (>= 1.1.3, < 2.0)
|
92
|
-
rspec-mocks (2.14.
|
93
|
-
rspec-rails (2.14.
|
96
|
+
rspec-mocks (2.14.6)
|
97
|
+
rspec-rails (2.14.1)
|
94
98
|
actionpack (>= 3.0)
|
99
|
+
activemodel (>= 3.0)
|
95
100
|
activesupport (>= 3.0)
|
96
101
|
railties (>= 3.0)
|
97
102
|
rspec-core (~> 2.14.0)
|
98
103
|
rspec-expectations (~> 2.14.0)
|
99
104
|
rspec-mocks (~> 2.14.0)
|
100
|
-
slim (2.0.
|
105
|
+
slim (2.0.2)
|
101
106
|
temple (~> 0.6.6)
|
102
107
|
tilt (>= 1.3.3, < 2.1)
|
103
|
-
slim-rails (2.
|
108
|
+
slim-rails (2.1.2)
|
104
109
|
actionpack (>= 3.0, < 4.1)
|
105
110
|
activesupport (>= 3.0, < 4.1)
|
106
111
|
railties (>= 3.0, < 4.1)
|
107
112
|
slim (~> 2.0)
|
108
|
-
sprockets (2.
|
113
|
+
sprockets (2.12.0)
|
109
114
|
hike (~> 1.2)
|
110
115
|
multi_json (~> 1.0)
|
111
116
|
rack (~> 1.0)
|
@@ -114,15 +119,15 @@ GEM
|
|
114
119
|
actionpack (>= 3.0)
|
115
120
|
activesupport (>= 3.0)
|
116
121
|
sprockets (~> 2.8)
|
117
|
-
temple (0.6.
|
122
|
+
temple (0.6.7)
|
118
123
|
thor (0.18.1)
|
119
|
-
thread_safe (0.
|
120
|
-
atomic
|
124
|
+
thread_safe (0.3.0)
|
125
|
+
atomic (>= 1.1.7, < 2)
|
121
126
|
tilt (1.4.1)
|
122
127
|
treetop (1.4.15)
|
123
128
|
polyglot
|
124
129
|
polyglot (>= 0.3.1)
|
125
|
-
tzinfo (0.3.
|
130
|
+
tzinfo (0.3.39)
|
126
131
|
|
127
132
|
PLATFORMS
|
128
133
|
ruby
|
@@ -1,15 +1,5 @@
|
|
1
1
|
begin
|
2
|
-
PaymentEngines.register(
|
3
|
-
name: 'paypal',
|
4
|
-
review_path: ->(contribution) {
|
5
|
-
CatarsePaypalExpress::Engine.routes.url_helpers.review_paypal_express_path(contribution)
|
6
|
-
},
|
7
|
-
can_do_refund?: true,
|
8
|
-
direct_refund: ->(contribution) {
|
9
|
-
CatarsePaypalExpress::ContributionActions.new(contribution).refund
|
10
|
-
},
|
11
|
-
locale: 'en'
|
12
|
-
})
|
2
|
+
PaymentEngines.register(CatarsePaypalExpress::PaymentEngine.new)
|
13
3
|
rescue Exception => e
|
14
4
|
puts "Error while registering payment engine: #{e}"
|
15
5
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
begin
|
2
|
+
module CatarsePaypalExpress
|
3
|
+
class PaymentEngine < PaymentEngines::Interface
|
4
|
+
|
5
|
+
def name
|
6
|
+
'PayPal'
|
7
|
+
end
|
8
|
+
|
9
|
+
def review_path contribution
|
10
|
+
CatarsePaypalExpress::Engine.routes.url_helpers.review_paypal_express_path(contribution)
|
11
|
+
end
|
12
|
+
|
13
|
+
def can_do_refund?
|
14
|
+
true
|
15
|
+
end
|
16
|
+
|
17
|
+
def direct_refund contribution
|
18
|
+
CatarsePaypalExpress::ContributionActions.new(contribution).refund
|
19
|
+
end
|
20
|
+
|
21
|
+
def locale
|
22
|
+
'en'
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
rescue Exception => e
|
28
|
+
puts "Error while use payment engine interface: #{e}"
|
29
|
+
end
|
@@ -12,6 +12,7 @@ module Dummy
|
|
12
12
|
# Application configuration should go into files in config/initializers
|
13
13
|
# -- all .rb files in that directory are automatically loaded.
|
14
14
|
|
15
|
+
|
15
16
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
17
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
18
|
# config.time_zone = 'Central Time (US & Canada)'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catarse_paypal_express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antônio Roberto Silva
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-03-
|
13
|
+
date: 2014-03-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- lib/catarse_paypal_express/contribution_actions.rb
|
130
130
|
- lib/catarse_paypal_express/engine.rb
|
131
131
|
- lib/catarse_paypal_express/gateway.rb
|
132
|
+
- lib/catarse_paypal_express/payment_engine.rb
|
132
133
|
- lib/catarse_paypal_express/version.rb
|
133
134
|
- lib/tasks/catarse_paypal_express_tasks.rake
|
134
135
|
- script/rails
|