mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +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
|
||||
'system_payment'
|
||||
end
|
||||
record_system_payment(channel: channel, invoice: invoice, registrar: registrar)
|
||||
create_internal_payment_record(channel: channel, invoice: invoice,
|
||||
registrar: registrar)
|
||||
end
|
||||
|
||||
def record_system_payment(channel: nil, invoice:, registrar:)
|
||||
def create_internal_payment_record(channel: nil, invoice:, registrar:)
|
||||
if channel.nil?
|
||||
create_activity(invoice.buyer, invoice)
|
||||
return
|
||||
|
@ -75,8 +76,8 @@ class BankTransaction < ApplicationRecord
|
|||
validate_invoice_data(invoice)
|
||||
return if errors.any?
|
||||
|
||||
record_system_payment(channel: (manual ? 'admin_payment' : nil), invoice: invoice,
|
||||
registrar: invoice.buyer)
|
||||
create_internal_payment_record(channel: (manual ? 'admin_payment' : nil), invoice: invoice,
|
||||
registrar: invoice.buyer)
|
||||
end
|
||||
|
||||
def validate_invoice_data(invoice)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue