Cover EveryPay / BankLink payments with tests

This commit is contained in:
Karl Erik Õunapuu 2020-02-04 09:42:26 +02:00
parent b6469f3dfe
commit 6418924faf
7 changed files with 145 additions and 61 deletions

View file

@ -57,14 +57,9 @@ class Registrar
private
def check_supported_payment_method
return if supported_payment_method?
return if PaymentOrder.supported_method?(params[:bank], shortname: true)
raise(StandardError, 'Not supported payment method')
end
def supported_payment_method?
method_name = PaymentOrder.type_from_shortname(params[:bank])
PaymentOrder.supported_method?(method_name)
end
end
end