the WA_PP_ECO_Set_Post() function takes 2 arguments:
1) an array of parameters
2) an array of the items.
In the code block for the code you give, before that is code to set the $WA_PP_ECO_Do_itemized array, and code to set the $WA_PP_ECO_Set_params array
WA_PP_ECO_Set_Post() function passes that information to the paypal server for processing.
If the response from paypal is an error, the user is redirected to the failure page.