mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +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
|
# both back and IPN
|
||||||
def back
|
def back
|
||||||
@bank_link = BankLink::Response.new(params[:bank], params)
|
@bank_link = BankLink::Response.new(params[:bank], params)
|
||||||
if @bank_link.valid?
|
if @bank_link.valid? && @bank_link.ok?
|
||||||
@bank_link.complete_payment
|
@bank_link.complete_payment
|
||||||
|
|
||||||
if @bank_link.invoice.binded?
|
if @bank_link.invoice.binded?
|
||||||
flash[:notice] = t(:pending_applieds)
|
flash[:notice] = t(:pending_applied)
|
||||||
else
|
else
|
||||||
flash[:error] = t(:something_wrong)
|
flash[:alert] = t(:something_wrong)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
flash[:error] = t(:something_wrong)
|
flash[:alert] = t(:something_wrong)
|
||||||
end
|
end
|
||||||
redirect_to registrar_invoice_path(@bank_link.invoice)
|
redirect_to registrar_invoice_path(@bank_link.invoice)
|
||||||
end
|
end
|
||||||
|
|
|
@ -88,6 +88,10 @@ class BankLink
|
||||||
!!validate
|
!!validate
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ok?
|
||||||
|
params["VK_SERVICE"] == "1111"
|
||||||
|
end
|
||||||
|
|
||||||
def complete_payment
|
def complete_payment
|
||||||
if valid?
|
if valid?
|
||||||
transaction = BankTransaction.find_by(description: params["VK_MSG"])
|
transaction = BankTransaction.find_by(description: params["VK_MSG"])
|
||||||
|
|
|
@ -656,7 +656,7 @@ en:
|
||||||
m_id: 'M-ID'
|
m_id: 'M-ID'
|
||||||
pending_removed: Pending was successfully removed.
|
pending_removed: Pending was successfully removed.
|
||||||
pending_applied: Pending was successfully applied.
|
pending_applied: Pending was successfully applied.
|
||||||
something_wrong: Not success, something went wrong
|
something_wrong: Sorry, something went wrong
|
||||||
failure: Not success
|
failure: Not success
|
||||||
not_found: Not found
|
not_found: Not found
|
||||||
no_connection_to_registry: Connection issue to the registry EPP or REPP server! Please try again later.
|
no_connection_to_registry: Connection issue to the registry EPP or REPP server! Please try again later.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue