mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 16:39:55 +02:00
Story#107571572 - banklinks workflow fixes
This commit is contained in:
parent
a54a15cea4
commit
fc5dbd3523
3 changed files with 9 additions and 5 deletions
|
@ -20,16 +20,16 @@ class Registrar::PaymentsController < RegistrarController
|
|||
# both back and IPN
|
||||
def back
|
||||
@bank_link = BankLink::Response.new(params[:bank], params)
|
||||
if @bank_link.valid?
|
||||
if @bank_link.valid? && @bank_link.ok?
|
||||
@bank_link.complete_payment
|
||||
|
||||
if @bank_link.invoice.binded?
|
||||
flash[:notice] = t(:pending_applieds)
|
||||
flash[:notice] = t(:pending_applied)
|
||||
else
|
||||
flash[:error] = t(:something_wrong)
|
||||
flash[:alert] = t(:something_wrong)
|
||||
end
|
||||
else
|
||||
flash[:error] = t(:something_wrong)
|
||||
flash[:alert] = t(:something_wrong)
|
||||
end
|
||||
redirect_to registrar_invoice_path(@bank_link.invoice)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue