Rename Payments to PaymentOrders

This commit is contained in:
Maciej Szlosarczyk 2018-04-30 09:30:34 +03:00
parent a1bbdc0d8e
commit d92004cbe0
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
9 changed files with 20 additions and 20 deletions

View file

@ -17,14 +17,14 @@ class Registrar
bank, invoice_id: invoice
)
}
@payment = ::Payments.create_with_type(bank, invoice, opts)
@payment = ::PaymentOrders.create_with_type(bank, invoice, opts)
@payment.create_transaction
end
def back
invoice = Invoice.find(params[:invoice_id])
opts = { response: params }
@payment = ::Payments.create_with_type(params[:bank], invoice, opts)
@payment = ::PaymentOrders.create_with_type(params[:bank], invoice, opts)
if @payment.valid_response_from_intermediary? && @payment.settled_payment?
@payment.complete_transaction
@ -42,7 +42,7 @@ class Registrar
def callback
invoice = Invoice.find(params[:invoice_id])
opts = { response: params }
@payment = ::Payments.create_with_type(params[:bank], invoice, opts)
@payment = ::PaymentOrders.create_with_type(params[:bank], invoice, opts)
if @payment.valid_response_from_intermediary? && @payment.settled_payment?
@payment.complete_transaction
@ -60,7 +60,7 @@ class Registrar
def supported_payment_method?
Payments::PAYMENT_METHODS.include?(params[:bank])
PaymentOrders::PAYMENT_METHODS.include?(params[:bank])
end
end
end