mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Provide better context for EveryPay / Banklink payment state alerts
This commit is contained in:
parent
2645654aef
commit
37e7def669
2 changed files with 10 additions and 4 deletions
|
@ -29,14 +29,13 @@ class Registrar
|
||||||
@payment_order.complete_transaction
|
@payment_order.complete_transaction
|
||||||
|
|
||||||
if @payment_order.invoice.paid?
|
if @payment_order.invoice.paid?
|
||||||
flash[:notice] = t(:pending_applied)
|
flash[:notice] = t('.payment_successful')
|
||||||
else
|
else
|
||||||
# flash[:alert] = t(:something_wrong)
|
flash[:alert] = t('.successful_payment_backend_error')
|
||||||
flash[:alert] = 'We fucked up'
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@payment_order.create_failure_report
|
@payment_order.create_failure_report
|
||||||
flash[:alert] = t(:something_wrong)
|
flash[:alert] = t('.payment_not_received')
|
||||||
end
|
end
|
||||||
redirect_to registrar_invoice_path(@payment_order.invoice)
|
redirect_to registrar_invoice_path(@payment_order.invoice)
|
||||||
end
|
end
|
||||||
|
|
7
config/locales/registrar/payments.en.yml
Normal file
7
config/locales/registrar/payments.en.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
en:
|
||||||
|
registrar:
|
||||||
|
payments:
|
||||||
|
back:
|
||||||
|
payment_successful: 'Thank you! Payment received successfully.'
|
||||||
|
successful_payment_backend_error: 'We received your payment, but something went wrong on our side. Please contact us via email or phone.'
|
||||||
|
payment_not_received: 'Payment was unsuccessful. Please make sure you have enough funds on your account and try again.'
|
Loading…
Add table
Add a link
Reference in a new issue