1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(bug) cancel payment schedule subscription after update the payment mean

This commit is contained in:
Du Peng 2023-09-13 14:36:37 +02:00
parent 16925bf129
commit 0e599bf9bb
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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