Selenium在PayPal的沙箱网站上的行为不一致

I'm creating automated test for the integration of my website with PayPal's Express Checkout. I use PHPunit (V3.7.28), Selenium server V2.39 and tried both Chrome and Firefox WebDrivers.

In my test, I click on 'Checkout with PayPal' button and redirected to my PayPal's sandbox page, login and complete the purchase. Here's a link to an express checkout page:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-********

The behavior is inconsistent. It might work sometimes, but usually it's stuck in my site and not loading PayPal's site. It looks like the page is started loading and the url is correct, but it doesn't finish loading up.

When I try to reproduce it manually:

  1. When I do it on my local machine without WebDriver, it works fine!
  2. When I use Selenium and open the browser using the WebDriver, I'm getting stuck.

Any idea why the browser get stuck while loading the page?
If any further information is needed, please let me know.