Show user only allowed customer-scoped payment methods

This commit is contained in:
Karl Erik Õunapuu 2020-02-05 09:16:24 +02:00
parent 5393130e34
commit fe8d1d1f0b
2 changed files with 2 additions and 1 deletions

View file

@ -7,6 +7,7 @@ class PaymentOrder < ApplicationRecord
INTERNAL_PAYMENT_METHODS = %w[admin_payment system_payment].freeze
PAYMENT_METHODS = [PAYMENT_INTERMEDIARIES, PAYMENT_BANKLINK_BANKS,
INTERNAL_PAYMENT_METHODS].flatten.freeze
CUSTOMER_PAYMENT_METHODS = [PAYMENT_INTERMEDIARIES, PAYMENT_BANKLINK_BANKS].flatten.freeze
belongs_to :invoice, optional: false

View file

@ -17,4 +17,4 @@
- if @invoice.payable?
.row.semifooter
.col-md-6-offset-6.text-right= render 'registrar/invoices/partials/banklinks', locals: { payment_channels: PaymentOrder::PAYMENT_METHODS }
.col-md-6-offset-6.text-right= render 'registrar/invoices/partials/banklinks', locals: { payment_channels: PaymentOrder::CUSTOMER_PAYMENT_METHODS }