Shopify/active_merchant — pull request #776 by rdj (2013-07-24 21:05:10+00:00)
Title: Braintree Blue implementation should instantiate Braintree::Gateway instead of using global vars and convenience methods

The Braintree Blue gateway implementation in AM uses the Braintree::Configuration global and performs all operations through class methods. Here are a couple of obvious things that breaks:

* You can't have two instances of BraintreeBlueGateway with different settings
* You can't use BraintreeBlueGateway in conjunction with other code that uses the Braintree gem

This isn't a shortcoming of the Braintree gem, which provides a way to create an instance bound to a particular configuration with appropriate instance methods for performing operations.

This commit moves from using the global vars and shortcut methods to instantiating a Braintree::Gateway object and using the appropriate instance methods instead.