title: Switch To Multiple Merchant Account With Activemerchant Gem For Paypal Express Checkout
body: <p>I am writing a Rails application and I understand that gateway objects are created with Activemerchant via the merchant's information. Usually, we would initialise the object via:</p>
  
  <pre><code># development.rb
  config.after_initialize do
      ActiveMerchant::Billing::Base.mode = :test
      paypal_options = {
        login: someone@mail.com,
        password: password123456here,
        signature: awesomeSignatureHere
      }
      ::EXPRESS_GATEWAY = ActiveMerchant::Billing::PaypalExpressGateway.new(paypal_options)
  </code></pre>
  
  <p>Now I have two merchants on my application and I would want to have payments being credited to their paypal accounts directly without going through me. What would be the recommended steps in the event the user choose to pay Vendor A via the form at the view level, the constant of EXPRESS_GATEWAY would be switched to the appropriate merchant provided I have the merchants' information for their API stored in the database?</p>
  
  <p>Thank you for your time.</p>