You can get it via the API using GetPalDetails. You can get it manually in your PayPal profile. Go to the Business Info section and you'll see a Merchant Account ID.
On another note, I see that you're using localhost in your return and cancel URL's, as well as IPN. This isn't going to work. Remember, it's PayPal's server that will be hitting that address. If they hit localhost, they're just hitting their own server, which isn't going to do what you want, of course.
If you want to test all of this with your local test server you'll need to use your IP address or setup some DNS and a domain of some sort. I personally like to follow PayPal's lead and setup a sandbox.domain.com as a test server for any site I'm working on.