mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 15:06:23 +02:00
Merge pull request #2438 from internetee/ignore-statuses-update-if-invoice-already-paid
Ignore statuses update if invoice already paid
This commit is contained in:
commit
e3a5f15fce
2 changed files with 35 additions and 0 deletions
|
@ -5,6 +5,9 @@ module EisBilling
|
|||
def update
|
||||
payment_status = define_payment_status(params[:payment_state])
|
||||
invoice = Invoice.find_by(number: params[:order_reference])
|
||||
|
||||
return if invoice.paid?
|
||||
|
||||
bank = create_bank_transfer(invoice: invoice, sum: params[:standing_amount], paid_at: params[:transaction_time])
|
||||
create_payment_order(invoice: invoice, everypay_response: params, payment_status: payment_status)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue