title: Accepting dummy credit cards on a live site with ActiveMerchant & PayPal
body: <p>I'm setting up a rails site that will accept credit cards with ActiveMerchant and PayPal Website Payments Pro. I am successfully testing against the PayPal sandbox, but need to be able to test on my live site as well. I'd like to implement a solution whereby registrations on my live site with email addresses from my own domain use the PayPal sandbox, but for everyone else it uses the live PayPal site. That way when I test my live site I'm not paying myself and getting taxed by PayPal in the process :-)</p>
  
  <p>The problem, however, is that to get ActiveMerchant to use the test servers you write this line:</p>
  
  <p><code>ActiveMerchant::Billing::Base.mode = :test</code></p>
  
  <p>That sets a class variable which will apply to other transactions on the site, when I simply wish for one transaction to target the test servers. </p>
  
  <p>Can anyone suggest an elegant solution? Or are there better ways to accomplish this other than the solution I have in mind?</p>