mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
added more conditions for unpaid and cancelled statuses
This commit is contained in:
parent
7b05e1e28a
commit
1b377dadcd
3 changed files with 9 additions and 2 deletions
|
@ -26,12 +26,15 @@ module EisBilling
|
|||
|
||||
def payment_orders_handler
|
||||
if @invoice.payment_orders.present?
|
||||
return if (@invoice.paid? && status.paid?) || (@invoice.cancelled? && status.cancelled?)
|
||||
return if (@invoice.paid? && status.paid?) || (@invoice.unpaid? && status.issued?)
|
||||
|
||||
if status.cancelled? || status.failed?
|
||||
if status.issued?
|
||||
@invoice.cancel_manualy
|
||||
elsif status.paid?
|
||||
@invoice.autobind_manually
|
||||
else
|
||||
# TODO
|
||||
# CANCELLED
|
||||
end
|
||||
else
|
||||
return unless status.paid?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue