Rename #create_with_type to #new_with_type

This commit is contained in:
Karl Erik Õunapuu 2020-02-05 16:28:01 +02:00
parent fe8d1d1f0b
commit 5d8e78f3c6
4 changed files with 16 additions and 14 deletions

View file

@ -12,13 +12,15 @@ class Registrar
invoice = Invoice.find(params[:invoice_id])
channel = params[:bank]
@payment_order = PaymentOrder.create_with_type(type: channel, invoice: invoice)
@payment_order.save && @payment_order.reload
@payment_order = PaymentOrder.new_with_type(type: channel, invoice: invoice)
@payment_order.save
@payment_order.reload
@payment_order.return_url = registrar_return_payment_with_url(@payment_order)
@payment_order.response_url = registrar_response_payment_with_url(@payment_order)
@payment_order.save && @payment_order.reload
@payment_order.save
@payment_order.reload
end
def back