If something was wrong, method returns an array with an error information (see Response codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_NVPAPIOverview#id08696I00GBL__id08696I070PM). After all, the buyer come to PP_RETURN url, or to PP_CANCEL.
You can call the get Checkout Details() method to obtain the detail information about the transaction too, e.g.
mail or invoice number If you want to play with this library at Pay Pal Sandbox, you have to generate Pay Pal object as new Pay Pal(); - to prevent unwanted side effect, such as money loose...
But implementing the full API is not a piece of cake.
There are some libraries on the web, but the most of them are paid, closed or too complex.
How to implement Pay Pal Express checkout for simple (and single) payment on your web site?