From fe8d1d1f0b0b7ffba5a779a6faaef115ced16cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Wed, 5 Feb 2020 09:16:24 +0200 Subject: [PATCH] Show user only allowed customer-scoped payment methods --- app/models/payment_order.rb | 1 + app/views/registrar/invoices/show.haml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/payment_order.rb b/app/models/payment_order.rb index c2cc883a6..3d788913b 100644 --- a/app/models/payment_order.rb +++ b/app/models/payment_order.rb @@ -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 diff --git a/app/views/registrar/invoices/show.haml b/app/views/registrar/invoices/show.haml index d987241b1..5e6104091 100644 --- a/app/views/registrar/invoices/show.haml +++ b/app/views/registrar/invoices/show.haml @@ -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 }