Merge pull request #4758 from luisramos0/fix_incomplete_stripe

Make the payment methods filter handle misconfigured stripe payment methods
This commit is contained in:
Luis Ramos
2020-02-25 18:47:09 +00:00
committed by GitHub

View File

@@ -15,9 +15,9 @@ module OpenFoodNetwork
end
def stripe_configuration_incomplete?(payment_method)
return true if payment_method.preferred_enterprise_id.zero?
payment_method.stripe_account_id.blank?
payment_method.preferred_enterprise_id.nil? ||
payment_method.preferred_enterprise_id.zero? ||
payment_method.stripe_account_id.blank?
end
end
end