diff --git a/CHANGELOG.md b/CHANGELOG.md index 68fe2b4a4..953eb15ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - improves api/notification controller to avoid failing when there is a notification with wrong notification_type in db - Add extra_authorize_params to OpenIdConnect config - Improvement : add a notification to remind users to upload their supporting documents +- Cancel payment schedule subscription after update the payment mean ## v6.0.14 2023 September 6 diff --git a/app/services/payment_schedule_service.rb b/app/services/payment_schedule_service.rb index ad289d2f1..7c5a1f47c 100644 --- a/app/services/payment_schedule_service.rb +++ b/app/services/payment_schedule_service.rb @@ -179,6 +179,7 @@ class PaymentScheduleService # Update the payment mean associated with the given PaymentSchedule and reset the erroneous items ## def update_payment_mean(payment_schedule, payment_mean) + PaymentGatewayService.new.cancel_subscription(payment_schedule) payment_schedule.update(payment_mean) && reset_erroneous_payment_schedule_items(payment_schedule) end