Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Restrict search to front-end payment methods
Browse files Browse the repository at this point in the history
We don't want users to be using backend-only or otherwise unavailable
payment methods when creating transactions.
  • Loading branch information
stewart committed Sep 12, 2016
1 parent 2e8ce21 commit 80246fc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def transaction_params
end

def payment_method
SolidusPaypalBraintree::Gateway.find(params[:payment_method_id])
SolidusPaypalBraintree::Gateway.
available(:front_end).
find { |g| g.id == params[:payment_method_id] }
end
end

0 comments on commit 80246fc

Please sign in to comment.