1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00

fix stripe subuscription cancal date

This commit is contained in:
Du Peng 2021-09-10 12:24:42 +02:00
parent c9f20ddc03
commit 745e2ae6cf

View File

@ -45,7 +45,7 @@ class Stripe::Service < Payment::Service
Stripe::Subscription.create({
customer: payment_schedule.invoicing_profile.user.payment_gateway_object.gateway_object_id,
cancel_at: (payment_schedule.payment_schedule_items.max_by(&:due_date).due_date + 3.day).to_i,
cancel_at: (payment_schedule.payment_schedule_items.max_by(&:due_date).due_date + 1.month).to_i,
add_invoice_items: items,
coupon: payment_schedule.coupon&.code,
items: [