pay 6.3.4 → 6.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pay/engine.rb +4 -0
- data/lib/pay/version.rb +1 -1
- data/lib/pay.rb +14 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f418566efec491866a28f3bb47fde5658eb5350bfcbf249b50e388282ea6d31
|
4
|
+
data.tar.gz: 3c6f258c34022ac7ee10b826b416dfd8b367de2aa84e5f826b2395ec4e43f0c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6309fcbec95c89a45cf364037df4f6efb9596e7e13e0068afb9ef98f30773e8c0ce4429c427ab197005a17e1879e0a2a32e2ccf4bd2087d664073500bc8be8d4
|
7
|
+
data.tar.gz: 983933113b7ee85e01e8d582d5bff735c0f27781e7005b65bc03537efd8d6e83f17f63401c36efd6c50af037ae5cab8fc0e90a4e95f31a75ad42efac753815d2
|
data/lib/pay/engine.rb
CHANGED
@@ -17,6 +17,10 @@ module Pay
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
config.after_initialize do
|
21
|
+
ActiveSupport.run_load_hooks(:pay, Pay)
|
22
|
+
end
|
23
|
+
|
20
24
|
# Add webhook subscribers before app initializers define extras
|
21
25
|
# This keeps the processing in order so that changes have happened before user-defined webhook processors
|
22
26
|
config.before_initialize do
|
data/lib/pay/version.rb
CHANGED
data/lib/pay.rb
CHANGED
@@ -57,6 +57,9 @@ module Pay
|
|
57
57
|
mattr_accessor :enabled_processors
|
58
58
|
@@enabled_processors = [:stripe, :braintree, :paddle]
|
59
59
|
|
60
|
+
mattr_accessor :send_emails
|
61
|
+
@@send_emails = true
|
62
|
+
|
60
63
|
mattr_accessor :emails
|
61
64
|
@@emails = ActiveSupport::OrderedOptions.new
|
62
65
|
@@emails.payment_action_required = true
|
@@ -111,12 +114,19 @@ module Pay
|
|
111
114
|
end
|
112
115
|
|
113
116
|
def self.send_email?(email_option, *remaining_args)
|
114
|
-
|
117
|
+
if resolve_option(send_emails, *remaining_args)
|
118
|
+
email_config_option_enabled = emails.send(email_option)
|
119
|
+
resolve_option(email_config_option_enabled, *remaining_args)
|
120
|
+
else
|
121
|
+
false
|
122
|
+
end
|
123
|
+
end
|
115
124
|
|
116
|
-
|
117
|
-
|
125
|
+
def self.resolve_option(option, *remaining_args)
|
126
|
+
if option.respond_to?(:call)
|
127
|
+
option.call(*remaining_args)
|
118
128
|
else
|
119
|
-
|
129
|
+
option
|
120
130
|
end
|
121
131
|
end
|
122
132
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Charnes
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-05-
|
13
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
rubygems_version: 3.4.
|
171
|
+
rubygems_version: 3.4.10
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Payments engine for Ruby on Rails
|