mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Ensure payment method is actually selected
This commit is contained in:
@@ -70,7 +70,7 @@ class SplitCheckoutController < ::BaseController
|
||||
end
|
||||
|
||||
def validate_payment!
|
||||
return true if params.dig(:order, :payments_attributes).present?
|
||||
return true if params.dig(:order, :payments_attributes, 0, :payment_method_id).present?
|
||||
|
||||
@order.errors.add :payment_method, I18n.t('split_checkout.errors.select_a_payment_method')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user