Shopify/active_merchant — pull request #947 by tjoyal (2013-12-10 12:36:45+00:00)
Title: Refactor gateway selector error handling

Simple change to expose better errors to external app using the gem.

First PR over this project, don't be shy to propose alternatives if they are better fit for the project standards.

Notes:
1. Would have liked to replace `.downcase` by a method that actually do an `.underscore`(or simply remove that `downcase`) as information could be lost when processing the string.

2. Is there a reason we do not whitelist what gateway are available? I fear it could lead to potential security breach if the user is in control of the gateway name as we evaluate it.