mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
handle bank response
This commit is contained in:
parent
f6110b8319
commit
a54a15cea4
3 changed files with 90 additions and 5 deletions
|
@ -20,6 +20,18 @@ class Registrar::PaymentsController < RegistrarController
|
|||
# both back and IPN
|
||||
def back
|
||||
@bank_link = BankLink::Response.new(params[:bank], params)
|
||||
if @bank_link.valid?
|
||||
@bank_link.complete_payment
|
||||
|
||||
if @bank_link.invoice.binded?
|
||||
flash[:notice] = t(:pending_applieds)
|
||||
else
|
||||
flash[:error] = t(:something_wrong)
|
||||
end
|
||||
else
|
||||
flash[:error] = t(:something_wrong)
|
||||
end
|
||||
redirect_to registrar_invoice_path(@bank_link.invoice)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue