mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Move payment method fetching logic to Model, rewrite tests for EveryPay component
This commit is contained in:
parent
fa1687baf0
commit
b6469f3dfe
10 changed files with 139 additions and 77 deletions
|
@ -10,11 +10,9 @@ class Registrar
|
|||
|
||||
def pay
|
||||
invoice = Invoice.find(params[:invoice_id])
|
||||
payment_type = params[:bank]
|
||||
channel = params[:bank]
|
||||
|
||||
channel = PaymentOrder.type_from_shortname(payment_type)
|
||||
|
||||
@payment_order = PaymentOrder.new(type: channel, invoice: invoice)
|
||||
@payment_order = PaymentOrder.create_with_type(type: channel, invoice: invoice)
|
||||
@payment_order.save && @payment_order.reload
|
||||
|
||||
@payment_order.return_url = registrar_return_payment_with_url(@payment_order)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue