The trick with the PayPal sandbox is you have 3 accounts, and you need to be logged into the system with your developer account when testing the website.
- The primary account is your developer account. This logs you into http://developer.paypal.com/.
- The other two (one Buyer one Seller) work within the sandbox system. You need to login with your developer account before you can use these other accounts.
The way I set mine up was to use my email address for the developer account and just use the default address generated by PayPal for the Buyer and Seller accounts. Also, if need be you can create multiple Buyer and Seller accounts under your developer account.
Below is a complete step-by-step for setup and checkout (tested with Drupal 7.15)
- Go to http://developer.paypal.com/ and create an account. This is separate from any existing PayPal account you may have.
- Click on “Create a pre-configured buyer or seller account.”
- Check “Buyer”, leave the email address alone, change the password if you’d like (but remember to write it down), then click “Create Account”. Note: for the screen shots for this tutorial I have changed the default Login Email to testac. Remember to write down the password, you will not be able to access it again.
- Click again on “Create a pre-configured buyer or seller account.” but this time create a “Seller” account.
- In Drupal, enable the PayPal module (under Ubercart – payments).
- Under “Administer » Store administration » Configuration » Payment settings” expand the “PayPal Website Payments Standard settings”.
- Set “PayPal e-mail address:” to the “Log-in email” you see for the business account you created (unless you manually set this the email address will be something like “email@example.com”). Remember to change it back when you are out of test mode. You should be able to get to “Test Accounts” page with the link: https://developer.paypal.com/devscr?cmd=_sandbox-acct-session and see your Seller “Log-in email” address.
- You can then change the rest of the settings in the Ubercart PayPal module as you’d like.
To complete a test checkout:
1. Make sure you are logged in to PayPal’s sandbox server using your main account (go here: http://developer.paypal.com)
2. In Drupal proceed to checkout as you normally would and after you click the button that would normally say “Submit Order”, you will be redirected to PayPal’s sandbox server. If you are properly logged in with your developer account you will see “XXX’s Test Store” at the top of the page.
3. Log in with your Buyer account information (something like “firstname.lastname@example.org”). Careful here as this is constantly crashing FF3 on my machine.
4. Complete the transaction using your phony test account for the Buyer.
5. You will then see a page saying your transaction is complete and a button taking you back to your store. Order emails do not appear to get sent (to either the buyer or store admin) if the user does not click this button to return to the store, although the order’s status is updated to “Payment receiver”.
Information copied from: http://www.wootenswebdesign.com/how-set-ubercart-and-paypal-sandbox-testing