mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
[bugfix] race condition on invoice after payment (concerning payment schedules) https://app.clickup.com/t/25zpmn1
This commit is contained in:
parent
60e9ccd7ce
commit
16accfca44
@ -3,6 +3,7 @@
|
||||
- Fix a bug: unable to show machine availability slot for admin
|
||||
- Fix a bug: unable to confirm modification of reservation for client
|
||||
- Fix a bug: unable to show deleted user in reservation slot
|
||||
- Fix a bug: race condition on invoice after payment (concerning payment schedules) https://app.clickup.com/t/25zpmn1
|
||||
|
||||
## v5.3.9 2022 April 01
|
||||
|
||||
|
@ -120,6 +120,8 @@ class Stripe::Service < Payment::Service
|
||||
pgo = PaymentGatewayObject.find_or_initialize_by(item: payment_schedule_item)
|
||||
pgo.gateway_object = stp_invoice
|
||||
pgo.save!
|
||||
elsif stp_invoice.status == 'draft'
|
||||
return # Could be that the stripe invoice does not yet reflect the payment made by the member, because we called that service just after payment is made. We call return here and PaymentScheduleItemWorker will anyway call that method every hour
|
||||
else
|
||||
notify_payment_schedule_item_error(payment_schedule_item)
|
||||
payment_schedule_item.update_attributes(state: 'error')
|
||||
|
Loading…
x
Reference in New Issue
Block a user