mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 23:54:44 +02:00
Rename create_payment_method to create_internal_payment_record
This commit is contained in:
parent
23b427e9dc
commit
5393130e34
1 changed files with 5 additions and 4 deletions
|
@ -43,10 +43,11 @@ class BankTransaction < ApplicationRecord
|
||||||
else
|
else
|
||||||
'system_payment'
|
'system_payment'
|
||||||
end
|
end
|
||||||
record_system_payment(channel: channel, invoice: invoice, registrar: registrar)
|
create_internal_payment_record(channel: channel, invoice: invoice,
|
||||||
|
registrar: registrar)
|
||||||
end
|
end
|
||||||
|
|
||||||
def record_system_payment(channel: nil, invoice:, registrar:)
|
def create_internal_payment_record(channel: nil, invoice:, registrar:)
|
||||||
if channel.nil?
|
if channel.nil?
|
||||||
create_activity(invoice.buyer, invoice)
|
create_activity(invoice.buyer, invoice)
|
||||||
return
|
return
|
||||||
|
@ -75,8 +76,8 @@ class BankTransaction < ApplicationRecord
|
||||||
validate_invoice_data(invoice)
|
validate_invoice_data(invoice)
|
||||||
return if errors.any?
|
return if errors.any?
|
||||||
|
|
||||||
record_system_payment(channel: (manual ? 'admin_payment' : nil), invoice: invoice,
|
create_internal_payment_record(channel: (manual ? 'admin_payment' : nil), invoice: invoice,
|
||||||
registrar: invoice.buyer)
|
registrar: invoice.buyer)
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_invoice_data(invoice)
|
def validate_invoice_data(invoice)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue