Yes, you need the same credentials on both the areas where the paypal code is.
You also need it on line 13:
$WA_PP_ECO_GetResult = WA_PP_ECO_Get_Post("", "", "", false);
$WA_PP_ECO_GetResult = WA_PP_ECO_Get_Post("userid", "password", "security key", false);
With your paypal API information added there as well.
Now that you have that page, just go through the checkout process like you have before. Once you get to the error page, type the location of the new page I had you create in the browser and view source on the page and that will have more information about why it is failing and where.
Right now it sounds like the problem is the missing api credentials on the pp_confirm page in the two locations.