mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-18 12:54:27 +01:00
Merge branch 'monthly-payment' into staging
This commit is contained in:
commit
29a6704ee9
@ -33,7 +33,7 @@ class StripeService
|
||||
|
||||
stp_subscription = Stripe::Subscription.create({
|
||||
customer: payment_schedule.invoicing_profile.user.stp_customer_id,
|
||||
cancel_at: subscription.expiration_date.to_i,
|
||||
cancel_at: (payment_schedule.ordered_items.last.due_date + 3.day).to_i,
|
||||
add_invoice_items: items,
|
||||
coupon: payment_schedule.coupon&.code,
|
||||
items: [
|
||||
|
@ -49,5 +49,7 @@ class PaymentScheduleItemWorker
|
||||
attached_object: psi
|
||||
psi.update_attributes(state: 'pending')
|
||||
end
|
||||
rescue StandardError
|
||||
psi.update_attributes(state: 'error')
|
||||
end
|
||||
end
|
||||
|
@ -73,8 +73,8 @@ Rails.application.configure do
|
||||
# config.serve_static_assets = true
|
||||
|
||||
config.action_mailer.default_url_options = {
|
||||
host: ->(*) { Setting.get('base_url_host') },
|
||||
protocol: ->(*) { Setting.get('base_url_protocol') }
|
||||
host: Rails.application.secrets.default_host,
|
||||
protocol: Rails.application.secrets.default_protocol
|
||||
}
|
||||
# config.action_mailer.perform_deliveries = true
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user