pay 1.0.2 → 2.0.0
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.
Potentially problematic release.
This version of pay might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +99 -31
- data/Rakefile +19 -19
- data/app/controllers/pay/payments_controller.rb +7 -0
- data/app/controllers/pay/webhooks/braintree_controller.rb +19 -6
- data/app/mailers/pay/application_mailer.rb +2 -2
- data/app/mailers/pay/user_mailer.rb +12 -0
- data/app/models/pay/subscription.rb +41 -10
- data/app/views/layouts/pay/application.html.erb +11 -5
- data/app/views/pay/payments/show.html.erb +134 -0
- data/app/views/pay/user_mailer/payment_action_required.html.erb +6 -0
- data/config/locales/en.yml +17 -0
- data/config/routes.rb +3 -2
- data/db/migrate/20190816015720_add_status_to_subscriptions.rb +14 -0
- data/lib/generators/pay/email_views_generator.rb +3 -3
- data/lib/generators/pay/views_generator.rb +13 -0
- data/lib/pay/billable/sync_email.rb +3 -4
- data/lib/pay/billable.rb +25 -18
- data/lib/pay/braintree/billable.rb +88 -82
- data/lib/pay/braintree/charge.rb +0 -2
- data/lib/pay/braintree/subscription.rb +74 -72
- data/lib/pay/braintree.rb +6 -6
- data/lib/pay/engine.rb +10 -10
- data/lib/pay/env.rb +0 -1
- data/lib/pay/payment.rb +52 -0
- data/lib/pay/receipts.rb +7 -7
- data/lib/pay/stripe/billable.rb +68 -37
- data/lib/pay/stripe/charge.rb +0 -2
- data/lib/pay/stripe/subscription.rb +7 -6
- data/lib/pay/stripe/webhooks/charge_refunded.rb +0 -2
- data/lib/pay/stripe/webhooks/charge_succeeded.rb +9 -10
- data/lib/pay/stripe/webhooks/customer_deleted.rb +5 -7
- data/lib/pay/stripe/webhooks/customer_updated.rb +0 -2
- data/lib/pay/stripe/webhooks/payment_action_required.rb +27 -0
- data/lib/pay/stripe/webhooks/{source_deleted.rb → payment_method_updated.rb} +1 -3
- data/lib/pay/stripe/webhooks/subscription_created.rb +6 -11
- data/lib/pay/stripe/webhooks/subscription_deleted.rb +1 -3
- data/lib/pay/stripe/webhooks/subscription_renewing.rb +0 -2
- data/lib/pay/stripe/webhooks/subscription_updated.rb +13 -10
- data/lib/pay/stripe/webhooks.rb +17 -11
- data/lib/pay/stripe.rb +5 -5
- data/lib/pay/version.rb +1 -1
- data/lib/pay.rb +42 -15
- metadata +27 -39
@@ -1,7 +1,6 @@
|
|
1
1
|
module Pay
|
2
2
|
module Stripe
|
3
3
|
module Webhooks
|
4
|
-
|
5
4
|
class CustomerDeleted
|
6
5
|
def call(event)
|
7
6
|
object = event.data.object
|
@@ -11,12 +10,12 @@ module Pay
|
|
11
10
|
return unless user.present?
|
12
11
|
|
13
12
|
user.update(
|
14
|
-
processor_id:
|
15
|
-
trial_ends_at:
|
16
|
-
card_type:
|
17
|
-
card_last4:
|
13
|
+
processor_id: nil,
|
14
|
+
trial_ends_at: nil,
|
15
|
+
card_type: nil,
|
16
|
+
card_last4: nil,
|
18
17
|
card_exp_month: nil,
|
19
|
-
card_exp_year:
|
18
|
+
card_exp_year: nil,
|
20
19
|
)
|
21
20
|
|
22
21
|
user.subscriptions.update_all(
|
@@ -25,7 +24,6 @@ module Pay
|
|
25
24
|
)
|
26
25
|
end
|
27
26
|
end
|
28
|
-
|
29
27
|
end
|
30
28
|
end
|
31
29
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Pay
|
2
|
+
module Stripe
|
3
|
+
module Webhooks
|
4
|
+
class PaymentActionRequired
|
5
|
+
def call(event)
|
6
|
+
# Event is of type "invoice" see:
|
7
|
+
# https://stripe.com/docs/api/invoices/object
|
8
|
+
|
9
|
+
user = event.data.object.customer
|
10
|
+
|
11
|
+
subscription = Pay.subscription_model.find_by(
|
12
|
+
processor: :stripe,
|
13
|
+
processor_id: event.data.object.subscription
|
14
|
+
)
|
15
|
+
|
16
|
+
notify_user(user, event.data.object.payment_intent, subscription)
|
17
|
+
end
|
18
|
+
|
19
|
+
def notify_user(user, payment_intent_id, subscription)
|
20
|
+
if Pay.send_emails
|
21
|
+
Pay::UserMailer.payment_action_required(user, payment_intent_id, subscription).deliver_later
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module Pay
|
2
2
|
module Stripe
|
3
3
|
module Webhooks
|
4
|
-
|
5
|
-
class SourceDeleted
|
4
|
+
class PaymentMethodUpdated
|
6
5
|
def call(event)
|
7
6
|
object = event.data.object
|
8
7
|
user = Pay.user_model.find_by(processor: :stripe, processor_id: object.customer)
|
@@ -13,7 +12,6 @@ module Pay
|
|
13
12
|
user.sync_card_from_stripe
|
14
13
|
end
|
15
14
|
end
|
16
|
-
|
17
15
|
end
|
18
16
|
end
|
19
17
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Pay
|
2
2
|
module Stripe
|
3
3
|
module Webhooks
|
4
|
-
|
5
4
|
class SubscriptionCreated
|
6
5
|
def call(event)
|
7
6
|
object = event.data.object
|
@@ -19,28 +18,24 @@ module Pay
|
|
19
18
|
subscription = Pay.subscription_model.new(owner: owner)
|
20
19
|
end
|
21
20
|
|
22
|
-
subscription.quantity
|
21
|
+
subscription.quantity = object.quantity
|
23
22
|
subscription.processor_plan = object.plan.id
|
24
|
-
subscription.trial_ends_at
|
23
|
+
subscription.trial_ends_at = Time.at(object.trial_end) if object.trial_end.present?
|
25
24
|
|
26
25
|
# If user was on trial, their subscription ends at the end of the trial
|
27
|
-
if object.cancel_at_period_end && subscription.on_trial?
|
28
|
-
subscription.
|
26
|
+
subscription.ends_at = if object.cancel_at_period_end && subscription.on_trial?
|
27
|
+
subscription.trial_ends_at
|
29
28
|
|
30
29
|
# User wasn't on trial, so subscription ends at period end
|
31
30
|
elsif object.cancel_at_period_end
|
32
|
-
|
31
|
+
Time.at(object.current_period_end)
|
33
32
|
|
34
|
-
|
35
|
-
else
|
36
|
-
subscription.ends_at = nil
|
33
|
+
# Subscription isn't marked to cancel at period end
|
37
34
|
end
|
38
35
|
|
39
36
|
subscription.save!
|
40
37
|
end
|
41
38
|
end
|
42
|
-
|
43
39
|
end
|
44
40
|
end
|
45
41
|
end
|
46
|
-
|
@@ -1,10 +1,9 @@
|
|
1
1
|
module Pay
|
2
2
|
module Stripe
|
3
3
|
module Webhooks
|
4
|
-
|
5
4
|
class SubscriptionDeleted
|
6
5
|
def call(event)
|
7
|
-
object
|
6
|
+
object = event.data.object
|
8
7
|
subscription = Pay.subscription_model.find_by(processor: :stripe, processor_id: object.id)
|
9
8
|
|
10
9
|
# We couldn't find the subscription for some reason, maybe it's from another service
|
@@ -15,7 +14,6 @@ module Pay
|
|
15
14
|
subscription.update!(ends_at: Time.at(object.ended_at)) if subscription.ends_at.blank? && object.ended_at.present?
|
16
15
|
end
|
17
16
|
end
|
18
|
-
|
19
17
|
end
|
20
18
|
end
|
21
19
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Pay
|
2
2
|
module Stripe
|
3
3
|
module Webhooks
|
4
|
-
|
5
4
|
class SubscriptionUpdated
|
6
5
|
def call(event)
|
7
6
|
object = event.data.object
|
@@ -9,27 +8,31 @@ module Pay
|
|
9
8
|
|
10
9
|
return if subscription.nil?
|
11
10
|
|
12
|
-
subscription
|
11
|
+
# Delete any subscription attempts that have expired
|
12
|
+
if object.status == "incomplete_expired"
|
13
|
+
subscription.destroy
|
14
|
+
return
|
15
|
+
end
|
16
|
+
|
17
|
+
subscription.status = object.status
|
18
|
+
subscription.quantity = object.quantity
|
13
19
|
subscription.processor_plan = object.plan.id
|
14
|
-
subscription.trial_ends_at
|
20
|
+
subscription.trial_ends_at = Time.at(object.trial_end) if object.trial_end.present?
|
15
21
|
|
16
22
|
# If user was on trial, their subscription ends at the end of the trial
|
17
|
-
if object.cancel_at_period_end && subscription.on_trial?
|
18
|
-
subscription.
|
23
|
+
subscription.ends_at = if object.cancel_at_period_end && subscription.on_trial?
|
24
|
+
subscription.trial_ends_at
|
19
25
|
|
20
26
|
# User wasn't on trial, so subscription ends at period end
|
21
27
|
elsif object.cancel_at_period_end
|
22
|
-
|
28
|
+
Time.at(object.current_period_end)
|
23
29
|
|
24
|
-
|
25
|
-
else
|
26
|
-
subscription.ends_at = nil
|
30
|
+
# Subscription isn't marked to cancel at period end
|
27
31
|
end
|
28
32
|
|
29
33
|
subscription.save!
|
30
34
|
end
|
31
35
|
end
|
32
|
-
|
33
36
|
end
|
34
37
|
end
|
35
38
|
end
|
data/lib/pay/stripe/webhooks.rb
CHANGED
@@ -1,33 +1,39 @@
|
|
1
|
-
require
|
2
|
-
Dir[File.join(__dir__,
|
1
|
+
require "stripe_event"
|
2
|
+
Dir[File.join(__dir__, "webhooks", "**", "*.rb")].each { |file| require file }
|
3
3
|
|
4
4
|
StripeEvent.configure do |events|
|
5
5
|
# Listen to the charge event to make sure we get non-subscription
|
6
6
|
# purchases as well. Invoice is only for subscriptions and manual creation
|
7
7
|
# so it does not include individual charges.
|
8
|
-
events.subscribe
|
9
|
-
events.subscribe
|
8
|
+
events.subscribe "charge.succeeded", Pay::Stripe::Webhooks::ChargeSucceeded.new
|
9
|
+
events.subscribe "charge.refunded", Pay::Stripe::Webhooks::ChargeRefunded.new
|
10
10
|
|
11
11
|
# Warn user of upcoming charges for their subscription. This is handy for
|
12
12
|
# notifying annual users their subscription will renew shortly.
|
13
13
|
# This probably should be ignored for monthly subscriptions.
|
14
|
-
events.subscribe
|
14
|
+
events.subscribe "invoice.upcoming", Pay::Stripe::Webhooks::SubscriptionRenewing.new
|
15
|
+
|
16
|
+
# Payment action is required to process an invoice
|
17
|
+
events.subscribe "invoice.payment_action_required", Pay::Stripe::Webhooks::PaymentActionRequired.new
|
15
18
|
|
16
19
|
# If a subscription is manually created on Stripe, we want to sync
|
17
|
-
events.subscribe
|
20
|
+
events.subscribe "customer.subscription.created", Pay::Stripe::Webhooks::SubscriptionCreated.new
|
18
21
|
|
19
22
|
# If the plan, quantity, or trial ending date is updated on Stripe, we want to sync
|
20
|
-
events.subscribe
|
23
|
+
events.subscribe "customer.subscription.updated", Pay::Stripe::Webhooks::SubscriptionUpdated.new
|
21
24
|
|
22
25
|
# When a customers subscription is canceled, we want to update our records
|
23
|
-
events.subscribe
|
26
|
+
events.subscribe "customer.subscription.deleted", Pay::Stripe::Webhooks::SubscriptionDeleted.new
|
24
27
|
|
25
28
|
# Monitor changes for customer's default card changing
|
26
|
-
events.subscribe
|
29
|
+
events.subscribe "customer.updated", Pay::Stripe::Webhooks::CustomerUpdated.new
|
27
30
|
|
28
31
|
# If a customer was deleted in Stripe, their subscriptions should be cancelled
|
29
|
-
events.subscribe
|
32
|
+
events.subscribe "customer.deleted", Pay::Stripe::Webhooks::CustomerDeleted.new
|
30
33
|
|
31
34
|
# If a customer's payment source was deleted in Stripe, we should update as well
|
32
|
-
events.subscribe
|
35
|
+
events.subscribe "payment_method.attached", Pay::Stripe::Webhooks::PaymentMethodUpdated.new
|
36
|
+
events.subscribe "payment_method.updated", Pay::Stripe::Webhooks::PaymentMethodUpdated.new
|
37
|
+
events.subscribe "payment_method.card_automatically_updated", Pay::Stripe::Webhooks::PaymentMethodUpdated.new
|
38
|
+
events.subscribe "payment_method.detached", Pay::Stripe::Webhooks::PaymentMethodUpdated.new
|
33
39
|
end
|
data/lib/pay/stripe.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
1
|
+
require "pay/env"
|
2
|
+
require "pay/stripe/billable"
|
3
|
+
require "pay/stripe/charge"
|
4
|
+
require "pay/stripe/subscription"
|
5
|
+
require "pay/stripe/webhooks"
|
6
6
|
|
7
7
|
module Pay
|
8
8
|
module Stripe
|
data/lib/pay/version.rb
CHANGED
data/lib/pay.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "pay/engine"
|
2
|
+
require "pay/billable"
|
3
|
+
require "pay/receipts"
|
4
|
+
require "pay/payment"
|
4
5
|
|
5
6
|
module Pay
|
6
7
|
# Define who owns the subscription
|
@@ -8,18 +9,18 @@ module Pay
|
|
8
9
|
mattr_accessor :billable_table
|
9
10
|
mattr_accessor :braintree_gateway
|
10
11
|
|
11
|
-
@@billable_class =
|
12
|
+
@@billable_class = "User"
|
12
13
|
@@billable_table = @@billable_class.tableize
|
13
14
|
|
14
15
|
mattr_accessor :chargeable_class
|
15
16
|
mattr_accessor :chargeable_table
|
16
|
-
@@chargeable_class =
|
17
|
-
@@chargeable_table =
|
17
|
+
@@chargeable_class = "Pay::Charge"
|
18
|
+
@@chargeable_table = "pay_charges"
|
18
19
|
|
19
20
|
mattr_accessor :subscription_class
|
20
21
|
mattr_accessor :subscription_table
|
21
|
-
@@subscription_class =
|
22
|
-
@@subscription_table =
|
22
|
+
@@subscription_class = "Pay::Subscription"
|
23
|
+
@@subscription_table = "pay_subscriptions"
|
23
24
|
|
24
25
|
# Business details for receipts
|
25
26
|
mattr_accessor :application_name
|
@@ -32,17 +33,19 @@ module Pay
|
|
32
33
|
@@send_emails = true
|
33
34
|
|
34
35
|
mattr_accessor :email_receipt_subject
|
35
|
-
@@email_receipt_subject =
|
36
|
+
@@email_receipt_subject = "Payment receipt"
|
36
37
|
mattr_accessor :email_refund_subject
|
37
|
-
@@email_refund_subject =
|
38
|
+
@@email_refund_subject = "Payment refunded"
|
38
39
|
mattr_accessor :email_renewing_subject
|
39
|
-
@@email_renewing_subject =
|
40
|
+
@@email_renewing_subject = "Your upcoming subscription renewal"
|
41
|
+
mattr_accessor :email_action_required_subject
|
42
|
+
@@email_action_required_subject = "Confirm your payment"
|
40
43
|
|
41
|
-
mattr_accessor :
|
42
|
-
@@
|
44
|
+
mattr_accessor :automount_routes
|
45
|
+
@@automount_routes = true
|
43
46
|
|
44
|
-
mattr_accessor :
|
45
|
-
@@
|
47
|
+
mattr_accessor :routes_path
|
48
|
+
@@routes_path = "/pay"
|
46
49
|
|
47
50
|
def self.setup
|
48
51
|
yield self
|
@@ -82,4 +85,28 @@ module Pay
|
|
82
85
|
|
83
86
|
class Error < StandardError
|
84
87
|
end
|
88
|
+
|
89
|
+
class InvalidPaymentMethod < Error
|
90
|
+
attr_reader :payment
|
91
|
+
|
92
|
+
def initialize(payment)
|
93
|
+
@payment = payment
|
94
|
+
end
|
95
|
+
|
96
|
+
def message
|
97
|
+
"This payment attempt failed beacuse of an invalid payment method."
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
class ActionRequired < Error
|
102
|
+
attr_reader :payment
|
103
|
+
|
104
|
+
def initialize(payment)
|
105
|
+
@payment = payment
|
106
|
+
end
|
107
|
+
|
108
|
+
def message
|
109
|
+
"This payment attempt failed because additional action is required before it can be completed."
|
110
|
+
end
|
111
|
+
end
|
85
112
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Charnes
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-02-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -52,9 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.8'
|
55
|
-
- - "<"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '5.0'
|
58
55
|
type: :development
|
59
56
|
prerelease: false
|
60
57
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -62,37 +59,34 @@ dependencies:
|
|
62
59
|
- - ">="
|
63
60
|
- !ruby/object:Gem::Version
|
64
61
|
version: '2.8'
|
65
|
-
- - "<"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '5.0'
|
68
62
|
- !ruby/object:Gem::Dependency
|
69
63
|
name: stripe_event
|
70
64
|
requirement: !ruby/object:Gem::Requirement
|
71
65
|
requirements:
|
72
66
|
- - "~>"
|
73
67
|
- !ruby/object:Gem::Version
|
74
|
-
version: '2.
|
68
|
+
version: '2.3'
|
75
69
|
type: :development
|
76
70
|
prerelease: false
|
77
71
|
version_requirements: !ruby/object:Gem::Requirement
|
78
72
|
requirements:
|
79
73
|
- - "~>"
|
80
74
|
- !ruby/object:Gem::Version
|
81
|
-
version: '2.
|
75
|
+
version: '2.3'
|
82
76
|
- !ruby/object:Gem::Dependency
|
83
77
|
name: bundler
|
84
78
|
requirement: !ruby/object:Gem::Requirement
|
85
79
|
requirements:
|
86
|
-
- - "
|
80
|
+
- - ">="
|
87
81
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
82
|
+
version: '0'
|
89
83
|
type: :development
|
90
84
|
prerelease: false
|
91
85
|
version_requirements: !ruby/object:Gem::Requirement
|
92
86
|
requirements:
|
93
|
-
- - "
|
87
|
+
- - ">="
|
94
88
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
89
|
+
version: '0'
|
96
90
|
- !ruby/object:Gem::Dependency
|
97
91
|
name: byebug
|
98
92
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,14 +107,14 @@ dependencies:
|
|
113
107
|
requirements:
|
114
108
|
- - "~>"
|
115
109
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
110
|
+
version: '6'
|
117
111
|
type: :development
|
118
112
|
prerelease: false
|
119
113
|
version_requirements: !ruby/object:Gem::Requirement
|
120
114
|
requirements:
|
121
115
|
- - "~>"
|
122
116
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
117
|
+
version: '6'
|
124
118
|
- !ruby/object:Gem::Dependency
|
125
119
|
name: mocha
|
126
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,47 +144,33 @@ dependencies:
|
|
150
144
|
- !ruby/object:Gem::Version
|
151
145
|
version: '0'
|
152
146
|
- !ruby/object:Gem::Dependency
|
153
|
-
name:
|
147
|
+
name: standardrb
|
154
148
|
requirement: !ruby/object:Gem::Requirement
|
155
149
|
requirements:
|
156
|
-
- - "
|
150
|
+
- - ">="
|
157
151
|
- !ruby/object:Gem::Version
|
158
|
-
version: '0
|
152
|
+
version: '0'
|
159
153
|
type: :development
|
160
154
|
prerelease: false
|
161
155
|
version_requirements: !ruby/object:Gem::Requirement
|
162
156
|
requirements:
|
163
|
-
- - "
|
157
|
+
- - ">="
|
164
158
|
- !ruby/object:Gem::Version
|
165
|
-
version: '0
|
159
|
+
version: '0'
|
166
160
|
- !ruby/object:Gem::Dependency
|
167
161
|
name: sqlite3
|
168
162
|
requirement: !ruby/object:Gem::Requirement
|
169
163
|
requirements:
|
170
164
|
- - "~>"
|
171
165
|
- !ruby/object:Gem::Version
|
172
|
-
version: 1.
|
173
|
-
type: :development
|
174
|
-
prerelease: false
|
175
|
-
version_requirements: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: 1.3.6
|
180
|
-
- !ruby/object:Gem::Dependency
|
181
|
-
name: stripe-ruby-mock
|
182
|
-
requirement: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - "~>"
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '2.5'
|
166
|
+
version: '1.4'
|
187
167
|
type: :development
|
188
168
|
prerelease: false
|
189
169
|
version_requirements: !ruby/object:Gem::Requirement
|
190
170
|
requirements:
|
191
171
|
- - "~>"
|
192
172
|
- !ruby/object:Gem::Version
|
193
|
-
version: '
|
173
|
+
version: '1.4'
|
194
174
|
- !ruby/object:Gem::Dependency
|
195
175
|
name: vcr
|
196
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,6 +214,7 @@ files:
|
|
234
214
|
- app/assets/javascripts/pay/application.js
|
235
215
|
- app/assets/stylesheets/pay/application.css
|
236
216
|
- app/controllers/pay/application_controller.rb
|
217
|
+
- app/controllers/pay/payments_controller.rb
|
237
218
|
- app/controllers/pay/webhooks/braintree_controller.rb
|
238
219
|
- app/helpers/pay/application_helper.rb
|
239
220
|
- app/jobs/pay/application_job.rb
|
@@ -244,14 +225,19 @@ files:
|
|
244
225
|
- app/models/pay/charge.rb
|
245
226
|
- app/models/pay/subscription.rb
|
246
227
|
- app/views/layouts/pay/application.html.erb
|
228
|
+
- app/views/pay/payments/show.html.erb
|
229
|
+
- app/views/pay/user_mailer/payment_action_required.html.erb
|
247
230
|
- app/views/pay/user_mailer/receipt.html.erb
|
248
231
|
- app/views/pay/user_mailer/refund.html.erb
|
249
232
|
- app/views/pay/user_mailer/subscription_renewing.html.erb
|
233
|
+
- config/locales/en.yml
|
250
234
|
- config/routes.rb
|
251
235
|
- db/migrate/20170205020145_create_subscriptions.rb
|
252
236
|
- db/migrate/20170503131610_add_fields_to_billable.rb
|
253
237
|
- db/migrate/20170727235816_create_charges.rb
|
238
|
+
- db/migrate/20190816015720_add_status_to_subscriptions.rb
|
254
239
|
- lib/generators/pay/email_views_generator.rb
|
240
|
+
- lib/generators/pay/views_generator.rb
|
255
241
|
- lib/pay.rb
|
256
242
|
- lib/pay/billable.rb
|
257
243
|
- lib/pay/billable/sync_email.rb
|
@@ -261,6 +247,7 @@ files:
|
|
261
247
|
- lib/pay/braintree/subscription.rb
|
262
248
|
- lib/pay/engine.rb
|
263
249
|
- lib/pay/env.rb
|
250
|
+
- lib/pay/payment.rb
|
264
251
|
- lib/pay/receipts.rb
|
265
252
|
- lib/pay/stripe.rb
|
266
253
|
- lib/pay/stripe/billable.rb
|
@@ -271,7 +258,8 @@ files:
|
|
271
258
|
- lib/pay/stripe/webhooks/charge_succeeded.rb
|
272
259
|
- lib/pay/stripe/webhooks/customer_deleted.rb
|
273
260
|
- lib/pay/stripe/webhooks/customer_updated.rb
|
274
|
-
- lib/pay/stripe/webhooks/
|
261
|
+
- lib/pay/stripe/webhooks/payment_action_required.rb
|
262
|
+
- lib/pay/stripe/webhooks/payment_method_updated.rb
|
275
263
|
- lib/pay/stripe/webhooks/subscription_created.rb
|
276
264
|
- lib/pay/stripe/webhooks/subscription_deleted.rb
|
277
265
|
- lib/pay/stripe/webhooks/subscription_renewing.rb
|
@@ -296,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
296
284
|
- !ruby/object:Gem::Version
|
297
285
|
version: '0'
|
298
286
|
requirements: []
|
299
|
-
rubygems_version: 3.
|
287
|
+
rubygems_version: 3.1.2
|
300
288
|
signing_key:
|
301
289
|
specification_version: 4
|
302
290
|
summary: A Ruby on Rails subscription engine.
|