mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
Merge branch 'story/107571572-seb' into staging
This commit is contained in:
commit
111fc8a8c3
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
|
||||
|
|
|
@ -88,6 +88,10 @@ class BankLink
|
|||
!!validate
|
||||
end
|
||||
|
||||
def ok?
|
||||
params["VK_SERVICE"] == "1111"
|
||||
end
|
||||
|
||||
def complete_payment
|
||||
if valid?
|
||||
transaction = BankTransaction.find_by(description: params["VK_MSG"])
|
||||
|
|
|
@ -656,7 +656,7 @@ en:
|
|||
m_id: 'M-ID'
|
||||
pending_removed: Pending was successfully removed.
|
||||
pending_applied: Pending was successfully applied.
|
||||
something_wrong: Not success, something went wrong
|
||||
something_wrong: Sorry, something went wrong
|
||||
failure: Not success
|
||||
not_found: Not found
|
||||
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