mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Validate inclusion of payment method when saving PaymentOrder
This commit is contained in:
parent
3f5b5962d1
commit
ec5ff5dc8c
4 changed files with 71 additions and 64 deletions
|
@ -28,7 +28,7 @@ class Registrar
|
|||
@payment_order.update!(response: params.to_unsafe_h)
|
||||
|
||||
if @payment_order.payment_received?
|
||||
@payment_order.complete_transaction(@payment_order.composed_transaction)
|
||||
@payment_order.complete_transaction
|
||||
|
||||
if @payment_order.invoice.paid?
|
||||
flash[:notice] = t(:pending_applied)
|
||||
|
@ -65,7 +65,8 @@ class Registrar
|
|||
end
|
||||
|
||||
def supported_payment_method?
|
||||
PaymentOrder.supported_method?(params[:bank])
|
||||
method_name = PaymentOrder.type_from_shortname(params[:bank])
|
||||
PaymentOrder.supported_method?(method_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue