1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-04-05 21:40:12 +02:00

(bug) unable to cancel stripe subscription canceled

This commit is contained in:
Du Peng 2025-03-31 12:36:01 +02:00
parent 5dfacf5515
commit 0330b4d81b

View File

@ -47,7 +47,9 @@ class Stripe::Service < Payment::Service
stp_subscription = payment_schedule.gateway_subscription.retrieve
Stripe::Subscription.delete(stp_subscription.id, {}, api_key: stripe_key) if stp_subscription.status != 'canceled'
return true if stp_subscription.status == 'canceled'
res = Stripe::Subscription.delete(stp_subscription.id, {}, api_key: stripe_key)
res.status == 'canceled'
end