mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Rename Payments to PaymentOrders
This commit is contained in:
parent
a1bbdc0d8e
commit
d92004cbe0
9 changed files with 20 additions and 20 deletions
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module Payments
|
||||
module PaymentOrders
|
||||
PAYMENT_INTERMEDIARIES = ENV['payments_intermediaries'].to_s.strip.split(', ').freeze
|
||||
PAYMENT_BANKLINK_BANKS = ENV['payments_banks'].to_s.strip.split(', ').freeze
|
||||
PAYMENT_METHODS = [PAYMENT_INTERMEDIARIES, PAYMENT_BANKLINK_BANKS].flatten.freeze
|
|
@ -1,4 +1,4 @@
|
|||
module Payments
|
||||
module PaymentOrders
|
||||
class BankLink < Base
|
||||
BANK_LINK_VERSION = '008'
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module Payments
|
||||
module PaymentOrders
|
||||
class Base
|
||||
include ActionView::Helpers::NumberHelper
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module Payments
|
||||
module PaymentOrders
|
||||
class EveryPay < Base
|
||||
USER = ENV['payments_every_pay_api_user'].freeze
|
||||
KEY = ENV['payments_every_pay_api_key'].freeze
|
|
@ -17,4 +17,4 @@
|
|||
|
||||
- if !@invoice.cancelled? && !@invoice.binded?
|
||||
.row.semifooter
|
||||
.col-md-6-offset-6.text-right= render 'registrar/invoices/partials/banklinks', locals: { payment_channels: Payments::PAYMENT_METHODS }
|
||||
.col-md-6-offset-6.text-right= render 'registrar/invoices/partials/banklinks', locals: { payment_channels: PaymentOrders::PAYMENT_METHODS }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue