mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
refactored
This commit is contained in:
parent
f22f16d720
commit
fdc2882b8f
6 changed files with 58 additions and 38 deletions
|
@ -12,10 +12,7 @@ class Registrar
|
|||
|
||||
if @invoice
|
||||
flash[:notice] = t(:please_pay_the_following_invoice)
|
||||
|
||||
add_invoice_instance = EisBilling::AddDeposits.new(@invoice)
|
||||
add_invoice_instance.send_invoice
|
||||
|
||||
send_invoice_data_to_billing_system
|
||||
redirect_to [:registrar, @invoice]
|
||||
else
|
||||
flash[:alert] = @deposit.errors.full_messages.join(', ')
|
||||
|
@ -25,6 +22,11 @@ class Registrar
|
|||
|
||||
private
|
||||
|
||||
def send_invoice_data_to_billing_system
|
||||
add_invoice_instance = EisBilling::AddDeposits.new(@invoice)
|
||||
add_invoice_instance.send_invoice
|
||||
end
|
||||
|
||||
def deposit_params
|
||||
params.require(:deposit).permit(:amount, :description)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue