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

@ -1,15 +0,0 @@
module Payments
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
def self.create_with_type(type, invoice, opts = {})
raise ArgumentError unless PAYMENT_METHODS.include?(type)
if PAYMENT_BANKLINK_BANKS.include?(type)
BankLink.new(type, invoice, opts)
elsif type == 'every_pay'
EveryPay.new(type, invoice, opts)
end
end
end